In SQL, the COUNT() function is an aggregate function that returns the number of items found in a group.
You can use COUNT() in multiple parts of a query. For example, you can use it in the SELECT list, or the HAVING clause when filtering groups.