Take a look at using the COUNTIF() function