Added functionality to main.cpp (arrow keys to adjust counter, esc to quit)