Let x be the number of four credit courses and let y be the number of six credit courses.
We know that the student have completed 21 courses, this means that:
We also know that he has 104 credits in total. This means that:
Then we have the system of equations:
To solve the system we solve the first equation for y and plug the value in the second one. That is:
Therefore, the student has taken 11 four credit courses.