In a comment to the original question, the OP suggests that an accurate count of people might not be needed, but the goal is rather to be able to detect an unusual amassing of people in an area. This is a slightly different, and probably much easier, problem.
Use an infrared camera
If you don't need to count exactly how many persons are in the area, but just detect that there is an unusually large number, then infra red camera is probably your best choice.
This should limit your problem to just measuring total human-heated area.
People show up as brightish blobs in infra red.
Now - with simple image processing, we can find the pixels within a certain interval and either just add them up, to find a measure for the total area of the image that depicts something that is roughly the heat of a human. If this grows rapidly, we can suspect there is an amassing of people in the area.