Implemented the counter display in the main activity