I have a database table with a set of category names in column A. think of it as category A, B, C, D, etc. then in column b I have numbers for each category. for a specific category, say category A, the related numbers are not unique and may occur in different frequencies.

now I have another table, a summary one and I want a formula to count unique numbers for each category from the database table and return it in front of the category name.
 I use excel 2010
for some reasons I do not want to use pivot table or macros

data is as below

A 10

A 10

A 20

A 15

B 25

B 25

B 25

B 30

B empty(blank)

the desired results should be as this

A 3

B 2

thanks for help