Coach Shawn gave a bag of Mamee to the pupils in his class. If he gave 4 packets to each pupil, he would have 14 packets left. If he gave 5 packets to each pupil, he would need another 11 packets of Mamee. How many pupils did Coach Shawn have in his class?