MariaDB COUNT() aggregate function is used to return the count of an expression.
The COUNT () Function counts only NOT NULL values.
COUNT (*) counts the total number of rows in a table.
COUNT () would return 0 if there were no matching rows.
Syntax:
SELECT COUNT(aggregate_expression)
FROM tables
[WHERE conditions];