in reply to Need explanation of frequency counting and ranking in a hash (was: can anyone explain)

You might (or might not) find it helpful to look at the answer that I gave a couple of days ago in reply to a question on calculating the mode (most common element) of a set of data.