Hello!
I don't know what is your demand,
it feels strange that decreases the count inside a timer handler.
Anyway, from my perspective, you may just need a sole timer,
you can create it by the ngx.timer.every. What's more, the count decreasing
may be organized to a FIFO queue, combined with a delay, maybe.
In addition, the usage of global variables is not recommended, using module level variables
is a better idea.