Hi there, and welcome to the board!
What version of Excel are you using? If you're in Excel 2007 or higher, you can use COUNTIFS to do multiple conditions.
If you're in 2003 or lower, you'll need to reach to SUMPRODUCT to make it work. Bob Phillips has an excellent article on using SUMPRODUCT for this purpose.