For convenience, the range B5:B15 isnameddata.
This problem can be solved with the COUNTIF function or the SUMPRODUCT function.
Both methods are explained below.
COUNTIF function
TheCOUNT functioncounts the number of cells in a range that match the supplied criteria.
COUNTIFS is in agroup of eight functionsthat share this syntax.