Counting Rows based on values in other columns
It will look something like this:

SELECT StudentID, SUM(CASE WHEN INSTR(Classes,:Class) THEN 1 ELSE 0 END) 
FROM Classes
GROUP BY StudentID;


This is Oracle syntax, so you will have to translate for Access.