Statistical Functions MSOfficeExcel 2007 Tutorial

Input the formula:  =COUNT(A1:A12, B1:B12)