COMC 2013 B Problem 3

Teams A and B are playing soccer until someone scores 29 goals. Throughout the game the score is shown on a board displaying two numbers - the number of goals scored by A and the number of goals scored by B. A mathematical soccer fan noticed that several times throughout the game, the sum of all the digits displayed on the board was 10. (For example, a score of 12: 7 is one such possible occasion). What is the maximum number of times throughout the game that this could happen?