Number Of Substrings In A String Python