in reply to getting the number of fields in hash per key

One of these should do what you want:
# index of last element print $#{$h{a}},"\n"; # number of elements my $num = @{$h{a}}; print "$num\n";