The light tram I use often (https://www.vltrio.com.br/) has a sensor above each door which counts how many passengers get in and out of the vehicle at each stop (the payment is done within the vehicle through NFC card readers near each door; the count from the door sensors allows estimating the amount of fare evasion). So these kinds of sensor do exist, and don't need facial recognition to do their job (this particular one wouldn't be able to do facial recognition even if it wanted to, due to its placement looking straight down).
(The presence of these sensors on that particular tram line isn't well known, so it's a bit hard to find more information; a quick web search found https://www.semanadetecnologia.com.br/25semana/wp-content/up... which has on its page 4 some sample images from these sensors, plus photos of the NFC readers).
Only if they were entirely built in the last decade and a half. During the hundred years before that, nobody was tracking riders with anything approaching that type of precision, and public transportation was better.
Very few systems that I've ridden on in the US track this kind of information. Most of the time you buy a one way ticket and ride for however many stops you want. There's no tracking for when people get off.
This level of indiscriminate surveillance is absolutely abnormal from a historical perspective -- it's "weird" they have it in the first place! There's no reason to think that it's necessary. (And since most public transport systems are at least partially government run, and your travel card is associated either implicitly or explicitly with your real identity, travel cards have become an excellent way for the government to surveil every member of the public indiscriminately, allowing for retroactive surveillance -- though of course rubber-stamp courts would give them access to this information from private companies too.)
Most public transport systems have not had access to this information for the vast majority of their existence (and managed to botch expansions just as well as they can today with the benefit of all this data) and have only gained access (along with law enforcement) to it recently.
The issues with increasing public transport coverage is not a lack of data, it's a lack of funding and interest.
> Travel Time Systems work through the analysis of collected traffic data. This data can be collected via cellular providers, GPS vendors, mobile app vendors and most popularly through Bluetooth and Wi-Fi Scanning. Bluetooth and Wi-Fi scanning technology makes use of non-intrusive roadside sensors to detect the unique addresses of the Bluetooth and Wi-Fi radios inside of driver's vehicle and smartphone. By picking up a unique radio ID at one sensor location and then another these systems are able to calculate the travel time experienced from sensor A to sensor B for that unique vehicle/driver. These systems collect and calculate thousands of data points like this in order to determine the average travel time between any two sensors on the road.
* https://stinson.ca/its-solutions/bluetooth-wifi-travel-time-...