Get their Least Common Multiple. The answer is 120 pupils :)
4 - 4, 8, 12 16, 20, 24 28, 32, 36, 40, 44, 48, 52, 56, 60, 64, 68, 72, 76, 80, 84, 88, 92, 96, 100, 104, 108, 112, 116, 120
6 - 6, 12, 18, 24, 30, 36, 42, 48, 54, 60, 66, 72, 78, 84, 90, 96, 102, 108, 114, 120
8 - 8, 16, 24, 32, 40, 48, 56, 64, 72, 80, 88, 96, 104, 112, 120
10 - 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120