I want to count words from a file. For example how many times appears the word "example" in a file. I thougth to use grep, but grep only counts the lines (if in the same line appears more than one "example" doesn't count as 2).
Is there a simple way to do that?
I don't mind if it is in another language (not in Perl).