found this improved version lying around.  for hash_count() it keeps
an internal counter rather than iterating.  hash_analyze() gives
more information but hard-coded writes to stderr.
don't forget to decrement counter in hash_remove()