MySQL SQL

MySQL COUNT()

Count rows or non-null values.

SELECT COUNT(*) AS product_count
FROM products;

COUNT(*) counts rows. COUNT(column) counts only rows where that column is not NULL.