http://qs321.pair.com?node_id=631929


in reply to m// vs grep for counting occurances of a string

incidentally, if you replace grep with map, you get the behavior you were expecting (a count of 4).