The example below should assist in what I am trying to do.

Col. A Col. B

XXX-01 8:00
XXX-01
XXX-01 9:00
XXX-02 8:00
XXX-02 9:00
XXX-02 10:00

I want to do a count where Column B has a time and Column A equals "XXX-01". The answer above should be 2. Or if I was trying to find "XXX-02" it would be 3.