It should be said that generally it's better to put the sensor closer to the hub. Not because it's going to measure any differently, as has been said, it's just counting how many times the wheel turns, but because if you put the sensor and magnet near the rim, the magnet is going past the sensor very fast, and at higher speeds the sensor may not pick up every revolution, leading to inaccuracy. Near the hub the magnet moves past the sensor quite a bit more slowly and you'll be less likely to have the sensor begin "skipping" counts at high speeds.
__________________
Work: the 8 hours that separates bike rides.