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);
    }