Comparing number... HELP @_@

I have a set of numbers & character, and each number/char appears more than once. Suppose: A, B, 6, 9, B, 8, 3, B……. (a total of 10 different kinds) How should I program, in order to find out the most occurring number/char? All the number/char has already been count, which means that I already know 6 appears six times, 9 appears 3 times, etc. I was trying to use a loop that save the first number as “temp” then start to compare the other, and if the temp is great, I would keep comparing until either the count of the other number/char is the same, then I would do something…but I start to get into infinite loop and very very long codes… any idea how to make it easier?
**Although this is a program in assembly language, I just want to get the concept (even in C is fine...)…

make an array whose index values cover all possible ascii character values that you may encounter and therefore need to count. fill all the elements with 0. then step through your text and use the character's ascii numeric value to increment the corresponding element in the array. you end up with an array with all the characters (including commas and spaces) counted.

If this is the case, you simply have to store a temporary max count, as you stated. Set this max count to the count of the FIRST counted character. Then loop through the remaining counts, and whenever the count exceeds the temporary max count, update it.

Of course, if you wish to know which character this count is for, then you'll also have to keep another temporary character variable to store this. Initialize this variable to the first character counted, and update it wheneven a new maximum count is found.