tobyink improves clarity by generating a list of counts and adding/summing them (makes an array of matches, scalar array is count), map made a list, feels good :)

you rely on generating a list of matches ( m//g) , and that map in scalar context returns a count

Is there a performance advantage? Penalty? Was map-in-scalar as expensive as map-in-void (before perlv5.8.1)?
It doesn't really matter as the reason for using map over foreach is clarity/brevity/tradition.
The basic intent echoed in all the manuals and books, map for transforming lists, grep for filtering lists, foreach(for) for counting (iterating).