Are you by chance applying this export file to more than 100 files?
Yes (101) but since $num(100,2) produces 100, that cannot explain the reported failure, surely.
If so, you have to use $num(%_counter%,3)
That doesn't fix it.
Before: After: