The count_all() method returns the number of rows in a table satisfying the criteria specified in the WHERE clause. It sets the number of rows or non NULL column values.
Permits you to determine the number of rows in a particular table. Submit the table name in the first parameter.
echo $this->db->count_all('tbl_user');
// Produces an integer, like 25