Count Number Of Substrings Leetcode 1508