I made this code to return the number of occurrences of letters in a string. this function returns \'6a3b5y\' but I want it to respect the order and display \'4a3b2a5y\' how to