Task: Text to Code
Input (English): SQL: SELECT AllergyType , Count ( * ) FROM Allergy_Type GROUP BY AllergyType
Feedback: should find the number of corresponding rows in has allergy table
Output (English): SELECT T2.allergytype ,  count(*) FROM Has_allergy AS T1 JOIN Allergy_type AS T2 ON T1.allergy  =  T2.allergy GROUP BY T2.allergytype