You can watch a video version of this tutorial below

Using the Text tool, create a column of digits from 0 to 0, as shown in the example below.

From Window -> Interactive -> Animation, add the effect "Fly in from Bottom" to your digits column. Change the settings to adjust the animation speed. You can name the animation digit-1.

If you wish to make a two digit animation, duplicate the animated digits column. To achieve this, select the column and holding the Alt key drag and drop it to the right. You can also simply copy/paste it if you prefer. Select the newly created column and in the Animation pane change its name to digit-2.

Aling the two columns so that the final number that you would like to show is formed. In our example below the number is 58. Group the 2 columns.

In the "Timing" panel, select both animations (digit-1 and digit-2) by holding the Shift key and click "Play together". You may wish to add a delay to the"digit-2" animation in order to slightly start after the first one.

Using the “Rectangule Frame Tool”, create a rectangular area. This area will act as a mask.

Select the group (containing the animated digit columns) and position it on top of the rectangular area (mask) you have just created, so that the final number appears inside. Cut the group of digits (Cmd+x / Ctrl+x), then select the mask, right click and "Paste Into".

You can easily increase the size of the animation with the Selection Tool by holding Cmd+Shift (Ctrl+Shift on Windows) and dragging one of the edge handles.

Use Window -> Interactive -> EPUB Interactivity Preview to see the final result.