RRule\RRule::count PHP Method

count() public method

Returns the number of occurrences in this rule. It will have go through the whole recurrence, if this hasn't been done before, which introduces a performance penality.
public count ( ) : integer
return integer
    public function count()
    {
        if ($this->isInfinite()) {
            throw new \LogicException('Cannot count an infinite recurrence rule.');
        }
        if ($this->total === null) {
            foreach ($this as $occurrence) {
            }
        }
        return $this->total;
    }