Limited automata and unary languages