Step 1: Split the students into four non-overlapping groups.
Instead of using the union formula directly, we can split every student in the class into exactly one of four categories: only Mathematics, only English, both subjects, and neither subject. Since these four categories do not overlap with each other, adding them up gives the total group size directly.
Step 2: Work out how many students like only Mathematics.
Out of the 10 students who like Mathematics, 4 of them also like English. So the number who like Mathematics but not English is:
\[ 10 - 4 = 6 \]
Step 3: Work out how many students like only English.
Out of the 12 students who like English, the same 4 also like Mathematics. So the number who like English but not Mathematics is:
\[ 12 - 4 = 8 \]
Step 4: List all four categories with their counts.
Only Mathematics: 6 students.
Only English: 8 students.
Both subjects: 4 students.
Neither subject: 6 students.
Step 5: Add the four categories together.
\[ 6 + 8 + 4 + 6 = 24 \]
Every student in the group falls into exactly one of these four boxes, so this sum is the exact total number of students, with no double counting and nothing left out.
Step 6: Compare with the other options.
18 (option A) is what you get if you forget to include the 6 students who like neither subject. 20 (option B) does not match any consistent split of the four categories. 32 (option D) would only appear if the 4 "both" students were mistakenly counted twice, once inside "only Mathematics" and again inside "only English."
Final Answer:
Adding the four separate groups, only Mathematics (6), only English (8), both (4), and neither (6), gives a total of 24 students.
\[ \boxed{24} \]