One (dummy) way is to first find the last possition of any non-zero number in the string. Then to find the max possition of these and use the result to substring the main value and count the rest.
For example: if we have 11510
we'll find the last possition of each non-zero numer
Num LastPostion
1 4
2 0
3 0
4 0
5 3
6 0
7 0
8 0
9 0
Then we have to find the max value. In our case this is 4.
After that we'll use mid() and len() functions
mid(11510, 4 + 1) - this will return 0
and we'll get the length (len(mid(11510, 4 + 1))). This will result in 1
The result of the script below will be:

RawData:
Load * Inline [
Value
1000
10000
10500
11510
23415
];
join
Load
Value,
RangeMax(One, Two, Three, Four, Five, Six, Seven, Eight, Nine) as MaxNonZero
;
Load
Value,
Index(Value, '1', -1) as One,
Index(Value, '2', -1) as Two,
Index(Value, '3', -1) as Three,
Index(Value, '4', -1) as Four,
Index(Value, '5', -1) as Five,
Index(Value, '6', -1) as Six,
Index(Value, '7', -1) as Seven,
Index(Value, '8', -1) as Eight,
Index(Value, '9', -1) as Nine
Resident
RawData
;
NoConcatenate
Data:
Load
Value,
len(mid(Value, MaxNonZero + 1)) as NumberOfZeros
Resident
RawData
;
Drop Table RawData;