Accounting Systems and Automata