yii\db\QueryInterface::count PHP Method

count() public method

Returns the number of records.
public count ( string $q = '*', Connection $db = null ) : integer
$q string the COUNT expression. Defaults to '*'.
$db Connection the database connection used to execute the query. If this parameter is not given, the `db` application component will be used.
return integer number of records.
    public function count($q = '*', $db = null);