code: public function countAllPublishedByType($nodeType)
      {
          $qa = $this->createAggregationQuery();
          $qa->match(
              array(
                  'nodeType' => $nodeType,
                  'status.publishedState' => true,
                  'deleted' => false
              )
          );
  
          return $this->countDocumentAggregateQuery($qa);
      }
docs: @param string $nodeType
  
  @return int