How many universities scored 40 in teaching criteria?
scored 40 refers to score = 40; in teaching refers to criteria_name = 'Teaching'
SELECT COUNT(*) FROM ranking_criteria AS T1 INNER JOIN university_ranking_year AS T2 ON T1.id = T2.ranking_criteria_id WHERE T2.score = 40 AND T1.criteria_name = 'Teaching' AND T2.score = 40