Usando apenas awk
:
awk '
$5==4{c4++};
$5==5{c5++};
END{
print "Fours: "c4;
print "Fives: "c5;
}' your_file
ou perl
:
perl -lane '
$count{$F[4]}++;
END{
print "Fours: $count{4}";
print "Fives: $count{5}"
}' your_file