perl -lne '$n=tr/,//;$h{$n}++;END{print "$h{$_} rows have $_ commas" for (keys %h)}' some_file.csv