I already know about countif.  There is also a function called sumif, which is similar. Instead of counting, it will sum up the values of a given range if criteria is met in another range.

Consider:

red    | 1
blue   | 4
green | 6
red    | 4

=sumif(A1:A4,"red",B1:B4)
result: 5

The sumproduct was new for me.  I have already started to use it. Keep up the informative shows. 