Write a function that performs a simple run-length encoding on a string. For each maximal run of the same character, replace the run with the character followed by the run length (always include the count even if it's 1). Return the resulting encoded string. Examples: - "aaabbc" -> "a3b2c1" - "abab" -> "a1b1a1b1" Constraints: input string may be empty and may contain any characters.
('aaabbc',)'a3b2c1'