Count Number Of Substrings