OK how about this...
so you're going to need to make a number sprite with animations from 0-9 and then duplicate it for how many digits you want on the counter. Call them something like digit1, digit2, etc. I'm going to assume a four digit counter like your example.
Then on the event sheet:
set digit1 animation to mid(zeropad(YourNumberVariable, 4), 1, 1)
set digit2 animation to mid(zeropad(YourNumberVariable, 4), 2, 1)
set digit3 animation to mid(zeropad(YourNumberVariable, 4), 3, 1)
set digit4 animation to mid(zeropad(YourNumberVariable, 4), 4, 1)
Haven't tested but that's what I'd try?
EDIT: removed a little bit of redundancy, whoops. I was using str() forgetting that zeropad() already puts out strings.