public function findCompetencyCount(Scale $scale)
    {
        return $this->createQueryBuilder('s')
            ->select('COUNT(c) AS competencies')
            ->leftJoin('s.competencies', 'c')
            ->where('s = :scale')
            ->groupBy('s')
            ->getQuery()
            ->setParameter(':scale', $scale)
            ->getSingleScalarResult();
    }
public function findCompetencyCount(Scale $scale)
    {
        return $this->createQueryBuilder('s')
            ->select('COUNT(c) AS competencies')
            ->leftJoin('s.competencies', 'c')
            ->where('s = :scale')
            ->groupBy('s')
            ->getQuery()
            ->setParameter(':scale', $scale)
            ->getSingleScalarResult();
    }
public function findCompetencyCount ( Scale $ scale ) { return $ this -> createQueryBuilder ( 's' ) -> select ( 'COUNT(c) AS competencies' ) -> leftJoin ( 's.competencies' , 'c' ) -> where ( 's = :scale' ) -> groupBy ( 's' ) -> getQuery ( ) -> setParameter ( ':scale' , $ scale ) -> getSingleScalarResult ( ) ; }
Returns the number of competency frameworks linked to a scale.

@param Scale $scale

@return int
Returns the number of competency frameworks linked to a scale .