Let the number of remaining students be r, making the total number of students in the class equal to 10 + 2 + r, which is 12 + r. Using the average formula, the total sum of the class scores is 10 students times 100 marks plus 2 students times 0 marks plus r students times 72 marks. We set this equal to the overall class sum, which is the total number of students multiplied by the class average of 76, giving the equation 1000 + 72r = (12 + r) times 76. Solving this equation, 1000 + 72r = 912 + 76r, which means 88 = 4r, so r equals 22. The total number of students in the class is 12 + 22, which equals 34.