Control 2 LEDs by single press button - looping issue

Hi all, I need some one to help me to solve this problem since i'm stuck for a while. I'm writing a program to control 2 LEDs with a single press button. The loop will scan how many time the button is pressed. If there is a single press, 1st button will be lighted up. If there is a double press, 2nd button will be light up. And loop over and again again just to look for single or double click to do difference tasks. I'm failed to achieve that goal with the following:

Much appreciate your input

const int buttonPin = 9;     // the number of the pushbutton pin
const int ledPin =  12;      // the number of the LED pin
int counter;
int buttonState = 0;  
int lastButtonState = 0;  

void setup() {
  // initialize the LED pin as an output:
  pinMode(ledPin, OUTPUT);      
  // initialize the pushbutton pin as an input:
  pinMode(buttonPin, INPUT);     
  Serial.begin(9600);
}

void loop(){

buttonState = digitalRead(buttonPin);
delay(100);

if (buttonState != lastButtonState){
          if(buttonState==HIGH){
          delay(50);
          counter++;
           if(counter>2){
             counter=0;}
        //} 
        
          if(counter==1){
             Serial.print("turn on LED 1  ");
             delay(100);}
          
          if(counter==2){
             Serial.print("turn on LED 2  ");
             delay(100);}
        }
    }
    lastButtonState = buttonState;
}

OK, two things to start with.

One: Go back to your post, choose "Modify", highlight the code and use the code ([ # ]) icon to mark it up as code so that we an look at it easily.

Now, do you want to have it simply switch to a different combination of the two LEDs on each click, or as I gather you want to have it respond differently to a rapid double-click as with your mouse? If the latter, I can cook up some neat code to do that. :D

You do need to more clearly define how the LEDs are to be switched on, and then off again.