Not everyone has a cell phone.
And the automation of counting people is problematic, because people are so different, and there are bothersome cases like lovers clinging to one another (which can look like one person). Video face recognition might be a way, but again, one of the members of that couple might have their face buried in the others bosom. And the field of view would need to include short people as well as giant people. And, what about babies--very hard to count, even with a turnstile (probably the best people counting solution)?
And example of the complexity: say you were you to attempt this by detecting weight or mass or with sensors in the floor:
There are one legged people, two legged people and "three" legged people [two legs and a cane], "four" legged people [two legs and crutches], then there are people in wheelchairs, and people with artificial limbs, people that use walkers, I've even seen a no legged person who gets around mainly with their hands.