Word count for text files

This may be an ignorant question but I wonder whether there is a way to word count a text file in EagleFiler without using an external app. An AppleScript may work but I am not much familiar with that. Any suggestion?

Thank you,
SL

This script will show the word count for the selected files…

tell application "EagleFiler"
	set _msg to ""
	set theRecords to selected records of browser window 1
	repeat with theRecord in theRecords
		set _text to text content of theRecord
		set _msg to _msg & ((count of words of _text) as text) & tab ¬
			& " words in " & quote & filename of theRecord & quote ¬
			& return & return
	end repeat
	display dialog _msg buttons "OK" default button "OK"
end tell

Wow, it works great!

Much thanks,
SL

Thanks Dave !