how to track the first digit (item)which appear the most and the least in listbox?

i was wondering are they any function to track the first digit appear the most in the listbox data.

Eg. like if my listbox have some item like this:

"Listbox"

===========
= 1234 =
= 4567 =
= 8890 =
= 5656 =
= 7890 =
= 4264 =
= 1889 =
= 9009 =
= 3434 =
===========


When i press cmdCheckTop, the result will be
1
bcos the first digit appear the most is 1.
it contains two time appear("1234" and "1889")

How to do it?
anybody knows?