i am able to visualize the steps but not able to code this properly. please check if my logic is correct.
1-take in the size of value of the string
2-find all the substrings in that string
3-sort all substring in order of the stringlength(increasing order).
4-check in increasing order if each substring is a CBnumber or not. and increment a variable say count.
5-move on to the next substring and do the same as mentioned in point 4 . also we need to keep checking if any previous substring is present in the current one if so we ll not consider it as a CB number
6-finally output the variable count.