ElggBatch::count PHP Method

count() public method

As this performs a separate query, the count returned may not match the number of results you can fetch via iteration on a very active DB.
See also: Countable::count()
public count ( ) : integer
return integer
    public function count()
    {
        if (!is_callable($this->getter)) {
            $inspector = new \Elgg\Debug\Inspector();
            throw new RuntimeException("Getter is not callable: " . $inspector->describeCallable($this->getter));
        }
        $options = $this->options + ['count' => true];
        return call_user_func($this->getter, $options);
    }