Python String Count Substrings Without Repeating