perl -nE 'my ($name, $val) = (split)[0,4]; $hash{$name} ++ if $val eq "yes"; END{ say "$_\t$hash{$_}" for keys %hash}'