It can be seen as distributing n unique objects above m groups
The students $S_1, S_2,...S_{10}$ are divided into 3 groups A, B and C such that each group has at least one students and C has at most 3. Find possibilities of forming groups
$$a+b+c=10$$
The number of positive integral solutions $(\ge 1)$ is $$\binom {10-1}{3-1}=36$$
I don’t know how to account for the cases where C has at most 3 students
Also I know this method of solving is probably wrong but I don’t know how else to do it.