I have a number of cells set up with numbers set in them,

Exp
A B C D E
1 1 3 8 16 33
2 16 22 23 33 41
3 9 11 30 39 41
4 14 18 19 22 42
5 15 19 22 32 33
6 7 8 18 26 36

the next part is some other numbers
exp- 1 14 15 19 42
this is setup up to change the colour of the cell, what i want is to be
able to have some cells down below that will count how many cells in each row
match,
as in row 1=1 row 4=3 row 5=1 and so on, any help if it possiable , would be
of a great help, thanks in advanced for any help