MySQL count function
The COUNT() function returns the number of rows that matches a specified criteria.
COUNT function to count the number rows in a table.
The return type of the COUNT function is BIGINT. The COUNT function will return zero if there was no matching row found.
COUNT(*) function returns the number of rows in a result set returned by a
SELECT statement. The
COUNT(*) function counts rows that contain non-NULL and NULL values.
If you use the COUNT(*) function to count the rows in a table without using a WHERE clause and selecting other columns, it will perform very fast.