in reply to extract sentences with certain number of a character

Don't use regexes for this, use the transliteration operator tr/ / /. It's function is actually to translates any given character in the first list to the corresponding character of the second. So tr/abc/efg/ would change every a to e, every b to f, etc. It returns the total number of characters found.
So to check if the line has exactly four 'r' just use tr/r/r/ or tr/r// which is the same.

E.g.:

while (my $line = <FILE>) { if ( ($line =~ tr/r//) == 4 ) { print $line; } }