C:\>perl -naF/\t/ -e "$hash{$F[4]}++ if /zaps/;END{print qq($_\t$hash{$_}\n) for sort keys %hash}" infile>outfile