Incremental Counter

manchap23:
Okay. would it work if I put the code like this?

  if (digitalRead(inductiveSensorpin7)) {

x++;
  }

No

Look at the StateChangeDetection example in the IDE