Creating a modular coin counter