Runnable simulator field guide
Beginner PLC counter scenario: test checklist
Direct answer
The learner can predict every count, prevent repeated counts from a held sensor and test completion and reset from known initial values.
Written for pLC beginners counting simulated parts and learning the difference between sensor state, edge event, accumulator and batch completion.

Scenario setup
Counted object, sensor active state, pulse duration, scan assumption, edge event, counter instance, accumulator, preset, done use, reset, initial state and data limit.
I/O and state map
Part movement through sensor and sampled input to edge detection, accumulator change, done state, downstream action and displayed batch count.
Normal run
Each representative part adds exactly one count and the declared preset produces one intended completion result.
Boundary run
Held sensor, bounce, two close parts, missed short pulse, simultaneous count and reset, zero preset, maximum count, reset and power return.
Injected fault
A material, sensor, input, pulse, scan, edge, instance, accumulator, preset, reset or output mismatch.
Target check
The behavior recreated using target input hardware and exact counter instruction semantics.
How do you count products with a PLC?
Detect one reliable event per product, feed it into a dedicated counter instance and verify accumulator, preset, reset and downstream use.
Why does a counter add more than one count for one product?
The sensor may chatter or remain true while the program applies level logic repeatedly; use documented edge behavior and test the physical pulse.