Help please!

I have a spreadsheet that lists categories with primary and secondary vendors with contract start and end dates. What I am looking to do is a count on the expiration date for a particular category for the primary vendor. Here is the funtion I did but it is returning a count of all the expiration dates over all categories. How can I change this formula to only count the expiration dates for Carpet Cleaning Primary vendors?


=IF(AND('Vendor Contracts'!G:G="Carpet Cleaning", 'Vendor Contracts'!H:H="Primary"),COUNT('Vendor Contracts'!L:L))