What is an easy way to count the number of times a word appears in a file?
This will also count multiple occurrences of the word in a single line:
grep -o 'word' filename | wc -l
2.1m questions
2.1m answers
60 comments
57.0k users