I need code to find duplicate numbers and continue to count the number of times the duplicate was found.

Example: I have 20,000 entries and 303 unique numbers. I need to know how many times each number has been duplicated. So from this:

1 2 1 3 1 2 3 3 52 1 52 300

and 1000s more I want to count the number of times each value occurs in the first column like so:

1 3 (This means we saw `1` three times) 3 1 52 2

How can I do that in Excel or should I use other software for this?