Yes, that's an important clarification. The sensor may be on the same shaft as the front sprocket, but it's actual sensing device is INside the case to read the shaft rpm, and NOT in any way dependant upon the number of teeth on the sprocket. Which leads to an interesting set of circumstances:
The sensor's reading is dependent only upon engine rpm and what gear the bike is in. So, when you change the front sprocket size, you don't change the sensor output. But that's the problem. Because when you reduce or increase the size of the front sprocket, you change the rpm of the rear wheel, which reduces or increases respectively the distance the wheel covers per second, and so the actual speed of the bike becomes lower or higher respectively THAN WHAT THE SENSOR STILL BELIEVES THE ROAD SPEED TO BE. THAT's why your speedo will then read higher or lower respectively than actual.
In "the old days", speedometers were typically cable driven off the front wheel, so gearing changes did not make the speedometer read too high or too low. But inserting a cheap sensor, and running a set of wires to it, is cheaper than providing a speedometer cable housing at the front wheel, a cable (that breaks from time to time), and room within and around the speedometer to run and attach the cable. And, "correction" of an inaccurate speedometer was much more difficult (required either a mini speedo cable gearbox or removing and reworking the mechanical speedometer). So, the manufacturers changed over to sensors, and it's, overall, probably a good thing,
Jim G