how does money counting machine work