Count the total number of contiguous substrings -- Adobe