Using standard Unix utilities:
< somefile tr 'AZ[:blank:][:punct:]' 'az\n' | sort | uniq -c
If you use a system without Gnu tr , you will need to replace " [:blank:][:punct:] " with a list of all the space characters and punctuation that you would like to consider as word delimiters, and what part of the word, for example " \t.,; ".
If you want the result to be sorted in decreasing order of frequency, you can add " | sort -r -n " to the end of it.
Note that this will also result in an unnecessary value for the spotlight characters; if this bothers you, after tr you can use sed to filter out empty lines.
source share