length(my_string)-Nvl(length(replace(my_string,'X')),0)