Updated Main.java: Fixed counter value and message