Answer: 3 students
Explanation:
You can solve this using the expression;
Total = A + B + C - Both - all - neither
Where A, B and C represent those taking one class
As each student must take at least 1 class, there is no 'neither'.
37 = 12 + 18 + 19 - 9 - All
37 = 40 - All
All = 40 - 37
All = 3