Doctrine Query builder, count related one to many rows
Summarising the comments:
$qb = $userRepository->createQueryBuilder('magazine')->addSelect("magazine.id,magazine.name,magazine.description")->leftJoin('magazine.wardrobe', 'wardrobe') // To show as well the magazines without wardrobes related->addSelect('COUNT(wardrobe.id) AS wardrobecount')->groupBy('magazine.id'); // To group the results per magazine