I would like to design a Turing machine that takes as input a tape with a sequence of As and counts them, writing the result in decimal at the end of computation. Example: initial tape: $AAAAAAAAAAA \to $ Final tape: $11$.
My problem, here, is actually how to handle the reminder after the number 9 is overpassed. If there're $27$ As on the tape, how can I write $27$ on the tape? I don't care about the transition function. I would like to know the idea that is behind.