How to use the C counter in MITSUBISHI PLC

A cylinder pushes the cylinder two times. How do we use the counter C to complete it?

First choose the condition, that is to say which input signal to count, I see the cylinder limit position sensor on the line, the cylinder is in place after the sensor bright, that is, the input signal, and then count the counter once,
LD x1
Set C1 K2