How to Reset the Counter

That is what my example does. You can calculate time by counter * 5 seconds no ?

Perhaps you should draw what you are trying to achieve. What should be the result ? The delay time between a unit and the next unit ?