I believe that some more modern trains allow TfL to measure the weight change of carriages under passenger load, which can be used to estimate numbers, but imagine the cost of trying to roll that out on all trains and platforms... The fares would have to double for a year at least.