code: public function count()
      {
          $className = $this->bxObject->getClassName();
          $queryType = 'D7Query::count';
          $filter = $this->filter;
  
          $callback = function () use ($filter) {
              return (int) $this->bxObject->getCount($filter);
          };
  
          return $this->handleCacheIfNeeded(compact('className', 'filter', 'queryType'), $callback);
      }
docs: Get count of users that match $filter.
  
  @return int