Does this work for you?
=COUNTIF(B:B,D5)