in reply to Confused by RegEx count

Can anyone help me understand what's going on here?
I'm not sure what your question is.

EDIT: This was getting some bad press, I assume because there was an assumption that I was being condescending or something. The replies to this assumed the OP didn't understand how transliteration and substitution matching work, but this didn't even occur to me. I was genuinely unsure about what the question was and was asking for clarification.