How to Count the number of People in a room using CCTV Camera feed?
This is clearly not an easy task.

The problem is, if you want a more-or-less accurate count, then you need to turn to advanced algorithms (and maybe use 2 cameras, or a kinect).

If you can't afford to take this path, then you need to try simpler options. Personally, I would try the following:


detecting skin pixels, segmenting the image with respect to that, then count the blobs (complexity medium);
detect faces, then count them. Obviously, people have to be facing the camera, but you can find any implementations of face detection with different libraries (complexity low);
use background subtraction (after some careful tuning to take into account natural illumination changes) and guess a count based on the number of pixels that belong to the foreground (complexity low, but expect poor results);
apply some existing pedestrian detection algorithm (complexity medium to high).


You don't have to implement all that by yourself. In your case, checking what OpenCV can do (or if your algorithm of choice is implemented in OpenCV) seems a good choice because:


Processing and openFrameworks have wrappers to OpenCV;
OpenCV usually has a good runtime performance;
many computer vision algorithms that will interest you are developed with OpenCV (face detection, background subtraction, probably pedestrian detection).