code: public function countWithBlockUsed($siteId, $language, $blockId)
      {
          $qb = $this->createQueryBuilder();
          $qb->field('language')->equals($language);
          $qb->field('siteId')->equals($siteId);
  
          $functionFilter = $this->generateFunctionFilterBlock($blockId);
          $qb->where($functionFilter);
  
          return $qb->getQuery()->execute()->count();
      }
docs: @param string  $siteId
  @param string  $language
  @param string  $blockId
  
  @return int