Vuoi farlo:
SELECT categories.id, max(categories.slug), count(categories_questions.id) AS numberOfQuestions
FROM categories
LEFT JOIN categories_questions
ON categories.id = categories_questions.category_id
group by categories.id
Il LEFT JOIN
farà in modo che le categorie senza domande vengano elencate con conteggio =0