Zend certified PHP/Magento developer

Countif with specific criteria

I am trying to use countif to count a name but only want the count to go ahead if the cell next to it displays yes.

E.g.

George Yes Count for George would be 1
Andy No Count for Andy is 0
George No Count is still 1 for George
Bob Yes Count for Bob is 1
George Yes Count is now 2 for George
etc

My current code is =IF(COUNTIF($E$3:E5,E5)=0,””,COUNTIF($E$3:E5,E5))
Which displays the count without taking into account Yes or No