code: public function count()
      {
          if ($this->queryShouldBeStopped) {
              return 0;
          }
  
          $queryType = 'SectionQuery::count';
          $filter = $this->normalizeFilter();
          $callback = function() use ($filter) {
              return (int) $this->bxObject->getCount($filter);
          };
  
          return $this->handleCacheIfNeeded(compact('queryType', 'filter'), $callback);
      }
docs: Get count of sections that match filter.
  
  @return int