public function count()
    {
        if ($this->_count !== null) {
            return $this->_count;
        }
        if ($this->_statement) {
            return $this->_count = $this->_statement->rowCount();
        }

        if ($this->_results instanceof SplFixedArray) {
            $this->_count = $this->_results->count();
        } else {
            $this->_count = count($this->_results);
        }

        return $this->_count;
    }
public function count()
    {
        if ($this->_count !== null) {
            return $this->_count;
        }
        if ($this->_statement) {
            return $this->_count = $this->_statement->rowCount();
        }

        if ($this->_results instanceof SplFixedArray) {
            $this->_count = $this->_results->count();
        } else {
            $this->_count = count($this->_results);
        }

        return $this->_count;
    }
public function count ( ) { if ( $ this -> _count !== null ) { return $ this -> _count ; } if ( $ this -> _statement ) { return $ this -> _count = $ this -> _statement -> rowCount ( ) ; } if ( $ this -> _results instanceof SplFixedArray ) { $ this -> _count = $ this -> _results -> count ( ) ; } else { $ this -> _count = count ( $ this -> _results ) ; } return $ this -> _count ; }
Gives the number of rows in the result set.

Part of the Countable interface.

@return int
Gives the number of rows in the result set .