find number of occurances of a word in a file unix code example
Example 1: find number of occurances of a string in a file shell
$ grep -o -i needs inspire.txt | wc -l
Example 2: count occurrences of word in file linux
grep -wc "your_text" FileName