how to get the number of keys in an hash

From: Liang (leo2002chen_at_hotmail.com)
Date: 08/25/04


Date: Wed, 25 Aug 2004 11:42:21 +0800

Hi,

I need to get the number of keys in an hash. Is there any convenient way to
get it?

or use the following one?
foreach $v (keys %hash){
    $count++;
}

Thanks in advance,
Liang