src/Paginator.php
private function setCount(int $count): self
    {
        $this->count = max($count, 0);
        if ($this->count > 0) {
            $this->countPages = (int)ceil($this->count / $this->limit);
        } else {
            $this->countPages = 1;
        }

        return $this;
    }
private function setCount(int $count): self
    {
        $this->count = max($count, 0);
        if ($this->count > 0) {
            $this->countPages = (int)ceil($this->count / $this->limit);
        } else {
            $this->countPages = 1;
        }

        return $this;
    }
private function setCount ( int $ count ) : self { $ this -> count = max ( $ count , 0 ) ; if ( $ this -> count > 0 ) { $ this -> countPages = ( int ) ceil ( $ this -> count / $ this -> limit ) ; } else { $ this -> countPages = 1 ; } return $ this ; }
Non-Immutable version of withCount.

@param int $count

@return self|$this
Non - Immutable version of withCount .