( by amj05 )
Have a look at the following screenshot:
I have the data in Column A and B.
And I have the following formula in Cell D1:
=query(A:B;"select A,count(B) where B contains 'Y' group by A label count(B) '' ";0)
And if you want to only count the number of times Y appears to the right of A, then I have the following formula in Cell G1:
=counta(iferror(query(A:B;"select A where A = 'A' and B contains 'Y' ";0)))