Excel Function: COUNTIF
The Excel function COUNTIF is used to count the number of cells that meet a specific criteria.
Usage:
=COUNTIF(range_of_cells, criteria)
Example of use
The goal here is to count the number of people registered for the course (in other words, the number of people who answered "Yes"):

Select the COUNTIF function and then enter the range of cells containing the responses as well as the "Yes" criteria:
=COUNTIF(B2:B11,"Yes")
Click OK.
The number of "Yes" responses is displayed:

If needed, you can download the Excel file used here: countif.xlsx
If you need to add additional criteria, use the COUNTIFS function.