It is not a sensor, it is a small computer program working from information about how many time the engine is started, how long it is run, and possibly temperatures and engine speeds.
It doesn't know what oil is used, it doesn't know when oil is changed. The program is dupposed to be reset when the oil is changed, not every one who changes oil knows how to do it, though the instructions are in your owners manual. Last time I went to my Ford dealer's quick change, the tech failed to do the reset.
Some of the criteria can be changed, i.e. a lesser percentage of maximum interval, by reprogramming from the vehicle information display. It is in the same part of the programming used to reset the oil use back to zero, instructions also in the manual but not very explicit.