in reply to How to count no of words in a text input file?
The rest of this site might be useful to you as well.