Use the technique shown in the state change detect example in the ide to detect a pulse and increment a counter. Use the technique shown in the blink without delay ide example to let 10 seconds elapse delay()-lessly; then display the counter and reset it to zero.