Can you solve the seemingly impossible number of girls puzzle?

Mind Your Decisions presents the "Seemingly impossible number of girls puzzle."

In Miss O's class, 1/3 of the students brought a teddy bear to school. Each boy took 12 books, each girl took 17 books, and each teddy bear took 9 books. A total of 305 books were taken out. How many girls were there in Miss Q's class?

This puzzle might not be very difficult, given that I could solve it and I am a terrible puzzle solver.