Hello,
I would code this using a bubble-sort (or other sort) that after the input is completed, the numbers in the array are sorted. Then, you can do a compare, and discard the duplicate elements. Then, you can run through the array and count the elements.
Christian