Implementation of the RemoteControl logic for sending messages based on the number of button clicks.