src/Queries/UserQuery.php
public function count()
    {
        if ($this->queryShouldBeStopped) {
            return 0;
        }

        $queryType = 'UserQuery::count';
        $filter = $this->normalizeFilter();
        $callback = function() use ($filter) {
            return (int) $this->bxObject->getList($order = 'ID', $by = 'ASC', $filter, [
                'NAV_PARAMS' => [
                    'nTopCount' => 0,
                ],
            ])->NavRecordCount;
        };

        return $this->handleCacheIfNeeded(compact('queryType', 'filter'), $callback);
    }
public function count()
    {
        if ($this->queryShouldBeStopped) {
            return 0;
        }

        $queryType = 'UserQuery::count';
        $filter = $this->normalizeFilter();
        $callback = function() use ($filter) {
            return (int) $this->bxObject->getList($order = 'ID', $by = 'ASC', $filter, [
                'NAV_PARAMS' => [
                    'nTopCount' => 0,
                ],
            ])->NavRecordCount;
        };

        return $this->handleCacheIfNeeded(compact('queryType', 'filter'), $callback);
    }
Get count of users according the current query.

@return int