in reply to getting the number of hashes

You could store references to all your hashes in a list,
@array = ( \%hash1, \%hash2, \%hash3 );

and then take the size of the array by scalar( @array );
If however, you mean finding the number of keys in a given hash, do this:

$var = keys %hash2;
$var now contains the number of key value pairs in the hash.