code: public function countNotDeletedInLastVersionWithSearchFilter(PaginateFinderConfiguration $configuration)
      {
          $qa = $this->createAggregateQueryNotDeletedInLastVersion();
          $filters = $this->getFilterSearch($configuration);
          if (!empty($filters)) {
              $qa->match($filters);
          }
          $elementName = 'contentType';
          $this->generateLastVersionFilter($qa, $elementName);
  
          return $this->countDocumentAggregateQuery($qa);
      }
docs: @param PaginateFinderConfiguration $configuration
  
  @return int