Count Substrings In String Python Replace Nan