my %tally = (); # Male on its own appeared twice $tally{hash1_terms1} = 2; # Female on its own appeared once $tally{hash1_terms2} = 1; # Child on its own appeared twice $tally{hash1_terms3} = 0; # and so on...