http://www.perlmonks.org?node_id=338909


in reply to count of a word occurrence

Golfed solution:
perl -lane '$c{$F[0]}++;END{print"$_=$c{$_}"for keys%c}'