You can consider using opencv to create something which recognises a seat that is empty versus a seat which is taken. There are several image processing algorithms which will be of use - though this would be custom software you'd have to make.
You'd have to train the software to learn what an empty seat looks like, or what a taken seat looks like - including training it to recognise what a seat with a bag / food in it looks like to not count it as taken.
If the seats are a certain bright colour, you may be able to get away with colour detection, though I doubt that'd be 100% accurate as students could wear clothes of the same colour as the seats.
I'd imagine the best angle would be overhead, but this may require several cameras to prevent distortion of the seats.
This would be VERY complicated and require a lot of man hours to produce the software and ensure it's trained properly.
Wouldn't it be easier to approach it from another angle? Take an automated count as people walk in through the entrance with a simple light beam and receiver and count each time it's broken. Maybe a foot pressure pad? Or people pushing a clicker as they walk in (which incidently could be connected to an led counter in the hall!). Something simple that could be done using a pi / arduino. I'm sure you'd get a few false positives with people walking out and back in, but it'd be FAR more simpler than what you're proposing.
Or, why not use the old traditional route - pass around a piece of paper with names on for "fire regulations". Then you could use OCR to see who attended quickly and make pretty graphs of it! If attendance is a part of the grade, then it'd be doubly useful.
Or... if you want to know what students are there, give each student an NFC card with an individual number encoded on it and as they walk in, they swipe it through a receiver. NFC cards are cheap, encoding them fairly trivial. Boom. Maybe they could be incorporated into student cards.
I guess though, from the lack of details and knowledge and effort shown in your question, this isn't for a real situation, only an assignment to get you to investigate methods and to make you think outside the box.