public function count()
    {
        if ($this->getInnerIterator() instanceof Countable) {
            return $this->getInnerIterator()->count();
        }

        return count($this->toArray());
    }
public function count()
    {
        if ($this->getInnerIterator() instanceof Countable) {
            return $this->getInnerIterator()->count();
        }

        return count($this->toArray());
    }
public function count ( ) { if ( $ this -> getInnerIterator ( ) instanceof Countable ) { return $ this -> getInnerIterator ( ) -> count ( ) ; } return count ( $ this -> toArray ( ) ) ; }
Make this object countable.

Part of the Countable interface. Calling this method
will convert the underlying traversable object into an array and
get the count of the underlying data.

@return int
Make this object countable .