yii\db\DataReader::count PHP Method

count() public method

This method is required by the Countable interface. Note, most DBMS may not give a meaningful count. In this case, use "SELECT COUNT(*) FROM tableName" to obtain the number of rows.
public count ( ) : integer
return integer number of rows contained in the result.
    public function count()
    {
        return $this->getRowCount();
    }