The MySQL count() function returns the number of rows that matches a specified expression. It is used when you need to count number of rows in atable or number of records of your table.
To count or calculate number of rows in a table, use the following syntax:
tablename: The table name from which you want to fetch records.
col1: The column on which you want to perform count. It will count NON-NULL values.
In the above example, we are calculating the number of "firstName" from tblCustomerLoan" table.
You can use MySQL Command Line Client to count number of rows in the specified table. It will look like this: