in reply to One Hash Instead of Two

Side issue: you probably want my (%count, %hash);. Cheers.