in reply to num keys of the hash within hash?

Double post. See below...

Use keys in scalar context. ie

my $count = keys %hash;