Okay, let's see. I need to find out how many students are participating in both MATHCOUNTS and the science club. The class has 50 students in total. Out of these, 28 are in MATHCOUNTS, 21 are in the science club, and 6 are in neither. Hmm, so first, I remember that when dealing with two groups and some overlap, the principle of inclusion-exclusion is probably useful here. Let me recall how that works.

The inclusion-exclusion principle states that for two sets, the size of their union is equal to the sum of the sizes of the individual sets minus the size of their intersection. In mathematical terms, that's |A ∪ B| = |A| + |B| - |A ∩ B|. So, if I can find the number of students in either MATHCOUNTS or the science club or both, that should be the total number minus those who are in neither. 

Wait, the total number of students is 50, and 6 are in neither. So, the number of students in at least one of the two clubs (MATHCOUNTS or science club) should be 50 - 6 = 44. Right? Because 6 are out of the 50 who aren't in either club. So, 50 minus 6 gives me the number of students in MATHCOUNTS or science club or both.

Now, according to the inclusion-exclusion principle, |MATHCOUNTS ∪ Science Club| = |MATHCOUNTS| + |Science Club| - |MATHCOUNTS ∩ Science Club|. So, substituting the numbers we have:

44 = 28 + 21 - |MATHCOUNTS ∩ Science Club|

Let me check that again. The union is 44, which is the sum of MATHCOUNTS (28) and Science Club (21) minus their overlap. So, solving for the overlap:

|MATHCOUNTS ∩ Science Club| = 28 + 21 - 44

Calculating that: 28 + 21 is 49, and 49 - 44 is 5. So, the overlap is 5. Therefore, 5 students are participating in both MATHCOUNTS and the science club.

Wait, let me verify this again to make sure I didn't make a mistake. Total students: 50. Neither club: 6. So, 50 - 6 = 44 in at least one club. MATHCOUNTS has 28, science club has 21. If we add those, 28 + 21 = 49. But since the total in at least one club is 44, the overlap must account for the difference. 49 - 44 = 5. That seems right. So, yes, 5 students are in both. 

Alternatively, another way to think about it is that the total number of students in both clubs is the sum of each individual club minus those who are in neither. But wait, no, that's not quite accurate. The formula is specifically about the union. So, the way I did it before is correct. 

Let me try plugging the numbers back into the formula to check:

|MATHCOUNTS ∪ Science Club| = 28 + 21 - x, where x is the overlap. This should equal 44. So, 28 + 21 = 49. 49 - x = 44. Solving for x gives x = 5. Yep, that checks out. 

I think that's solid. So, the answer should be 5 students.
</think>