Try the following:
grep -o "string" filename | wc -w
If you want all files in a directory, run the following script from that directory:
for file in * do let count=$count+`grep -o "wordyouaretryingtofind" $file | wc -w` done echo occurence $count times