Hi @winfs
Please try the below code
LOOP LoopIndex FROM 1 TO 100000 STEP 1
Text.FromNumber Number: LoopIndex DecimalPlaces: 0 UseThousandsSeparator: False FormattedNumber=> LoopIndex_Text
IF (contains(LoopIndex_Text, 4, True)) = 4 THEN
Variables.IncreaseVariable Value: LastIndex IncrementValue: 1
END
END
and the change you need to write the if condition as shown in below image

in If activity first operand
%Contains(Yourvariable,Textyou need to check, True)%
Hope this helps,
Usha.