what exactly you want to achive by counting scans?
measure scan time of the plc? you can simply read register
since this is already calculated by cpu. default is to show
values in 10ms increments but toggling bit S:33/9 will
change it to 1ms resolution.
Then use an unconditonal counter and unlatch the /CU bit so that it will count continuously. The CU bit is what the counter uses so it only up counts on a false to true rung transtion. Unlatching the CU bit makes the counter run continuously. This way the CTU instruction will do all of the adding and comparing for you. With a CTU, you also wont have to worry about integer roll over and the minor error bet set by rolloever.