print paragraph's number

Hi
I look for the right syntax to print only the paragraph’s number instead the paragraph’s text, searching for a certain, recurrent word!

I tried with žcat -n" and žgrep" but I get paragraphs numbers with the text appendage too

Finally, if somebody knows a nice book for shell scripts?