public function countByCompetency(Competency $competency)
    {
        return $this->createQueryBuilder('ca')
            ->select('COUNT(ca)')
            ->where('ca.competency = :competency')
            ->setParameter(':competency', $competency)
            ->getQuery()
            ->getSingleScalarResult();
    }