The proximity sensor in your device is continually monitored and when the detection level is crossed, the counter is increased by one. The proximity sensor is generally used to detect when the phone is placed to the head in answering calls. The proximity sensor is typically located near the speaker at the top of the phone.