I run a Lottery syndicate and I have an excel spreadsheet which checks the draws for me and also enters the drawn numbers into another worksheet which then sorts them into the amount of times they have each been drawn? The formula/function I use is COUNTIF. It seems to do what you want. It is something like this:
=countif($a$4:$f$500,i4) and then copied down by the amount of rows. (in my case 49) so that i4 changes to i5, i6 etc.
You will obviously have to use your own cell references. Also I found it does have to use absolute cell references.
I am sure Vog will come up with a better solution, but mine works for what I want it to do.