When working with text files, it is usefull to know how to count how many times a string appears in a file. To do that, use this oneliner:
$ grep -o string /path/to/file | wc -l
$ cat jedi
jedi jedi jedi jedi jedi
$ grep -o jedi /path/to/file | wc -l
grep -o jedi matches only the jedi strings and displays one match per line. wc -l counts the lines only.