in reply to How to find size of each hash of hashes
See Tutorials: References quick reference
With perl 5.14 and higher scalar keys $hash{a}{b}{c}{d}
With perl 5 and higher scalar keys %{ $hash{a}{b}{c}{d} }