How does a money counting machine work?