Can someone check my code? My Arduino isn't doing a consistent count cycle
The only reason it might "jump the gun" would be this line:


         while(digitalRead(Prox_Input) == HIGH){}          // waiting the sensor signal 



I suggest you check for a transition, that is, make sure the proximity switch has become LOW, and then wait for it to become HIGH again. So for example, if sending HIGH to the relay should make the proximity sensor read LOW, then put a loop in to make sure it does that, before proceeding.