Try this for the formula in your custom column:
Power Query:
if Text.Length(Text.BeforeDelimiter([Term],"0",0)) = 1 then 0 else Text.Length([Term])-Text.Length(Text.Replace([Term]," ",""))+1
PQ does not support use of wildcards so you kind of have to maneuver around that with the existing
Text.
functions: If the length of the text before the first instance of "0" is 1, then apply your logic.