Counting pulses with Arduino Nano

Thank you!
I am trying to count every one until 40. When it reach the number 40 it has a 1 second delay and the count return to 0 and then start again.
If i remove the Serial.print(cont) How will i see the cont value? How will i know when it reach 40?