Actually I'm somewhat certain that the vehicle speed is determined by the motor RPM, the known reduction gear ratio, and a known tire size. That's why speed can be inaccurate if you switch to incorrectly sized tires.
But yes, it does assume that the tires are a certain size, so if you put the wrong size tires on, it will be wrong. Also, it's not super-accurate: tires sizes differ slightly by brand/model, plus they change their outer diameter as they wear down. That error accumulates.
If the errors really accumulated, once in a while we would need to recalibrate the speed sensor, else we would be doing 90 and showing 10. In fact the error is limited to some reasonable amount.