counting duplicate numbers in a list

Hello, I thought I had seen this come up on the forums before, but I can't seem to find it.

I have a list of numbers and some of them are duplicates. I want to be able to either count the number of times each number is repeated, or find each number that is less than a certain number of duplicates (either would work, and I assume the steps to getting to both are very similar).

I would like to do it without vb or c# if possible.

Thanks, and I'll be hacking away at it in the mean time.