If you run a statement such as INTRDEF 3, 100, 1 once.
Then every time the input #5 (interrupt channel 3) goes from OFF to ON, custom function #100 is executed. If you put a variable there:
e.g.
C = C+1
IF C >= 1000 THEN
..
ENDIF
This creates a counter in variable C and counts up to 1000 then trigger some actions (you define what you want to do there).