grep get count of matches
grep -o '' fileName | wc -l
Here is what the above code is Doing:
1. grep -o ‘
-o means only print the matching part of the line
‘
fileName is the file you’re searching in
2. wc -l
wc is the word count command
-l means only print the number of lines