It is commonly used to determine the number of entries in a table, count distinct values, or count rows after filtering data. It sets the number of rows or non NULL column values. COUNT () returns 0 if there were no matching rows. Syntax: The above syntax is the general SQL 2003 ANSI standard syntax.