The reason it counts down so quickly is that you placed the /dec within a while loop, which execute the commands within them repeatedly and without (intentional) delay until the condition is met. Simply omit the while loop (-z will continue automatically), and it should work. If you want to see the value of the variable every time it decreases, you can use the -s switch. (Although keep in mind that it will appear in the status window rather than the active window)

By the way, /set can also use the -z switch, so you can omit the /dec entirely as well.