how to count the number of a specific character at the end of a string ignoring duplicates?,len(my_text) - len(my_text.rstrip('?'))