fuel/fuel/core/classes/database/connection.php
public function count_records($table)
	{
		// Quote the table name
		$table = $this->quote_table($table);

		return $this->query(\DB::SELECT, 'SELECT COUNT(*) AS total_row_count FROM '.$table, false)
			->get('total_row_count');
	}
public function count_records($table)
	{
		// Quote the table name
		$table = $this->quote_table($table);

		return $this->query(\DB::SELECT, 'SELECT COUNT(*) AS total_row_count FROM '.$table, false)
			->get('total_row_count');
	}
public function count_records ( $ table ) { // Quote the table name $ table = $ this -> quote_table ( $ table ) ; return $ this -> query ( \ DB :: SELECT , 'SELECT COUNT(*) AS total_row_count FROM ' . $ table , false ) -> get ( 'total_row_count' ) ; }
Count the number of records in a table.

// Get the total number of records in the "users" table
$count = $db->count_records('users');

@param   mixed $table table name string or array(query, alias)

@return  integer
Count the number of records in a table .