Have alook at
People Counting with OpenCV, Python & Ubidots
I'm quite sure that ubidots isn't necessary, it gives you an idea how to count people. I haven't tested it myself, yet. If you want to count faces only it is fairly easy to make use of opencv's cv2.CascadeClassifier and the cascades/haarcascade_fontalface_default.xml which comes already with opencv.
Which platform do you plan to use? And what is the average age of your students. For pupils It could become quite challenging .
I have an approach to catch the video stream in openvc which is exact what you are looking for. And independent from the program to control
tello, but both (video catcher and
tello steering) must run on the same machine.
Be ware not all opencv implementation support this feature. I use the opencv implementation on Windows which you can install from pipy. On Raspberry/Linux I built it on my own. Not such easy.
See my answer here:
Taking Pictures with Tello Drone using Python 3