JavaScript counter

If someone have a tip or snippet for me I’ll be happy :grinning:

I want a counter that counts up from 0 to a value that I can set. It would be nice if I could use the the new dynamic input to scripts so it could be edited by a cms editor. I also want to be able to style it of course.

I think I want the default value should be 0000000 not 0.

Thanks