You can pipe your grep with wc -l to get count of lines containing your keyword:
grep
wc -l
grep -r "string_example" . | wc -l
You could also use awk to do this:
awk '/string_example/{++c}END{print c}' *
c is incremented every time a line matches the pattern. Once all files have been read, print the total count.
c
You want something like this?
grep -l string_example *|xargs wc -l
Edit:You want to get numer of lines that matched in all files, or total numer of lines in files that contains matched line?