COUNT
Counts rows or values that aren't NULL.
Syntax
COUNT(*)
COUNT(<column>)
COUNT(DISTINCT <column>)
COUNT(*) counts all rows. COUNT(<column>) — only those where the column isn't NULL. COUNT(DISTINCT <column>) — how many different values there are. Together with GROUP BY it counts separately for each group.