arduino counting LED light

I need some help if any can help me please do. I want to use the serial monitor to count how many time's the LEd light come's on can any one help me here is my sketch so far...i'm not sure what to do next please point me in the right direction..thanks
nt ledpin = 12;

void setup()
{
//set outpups
pinMode(ledpin, OUTPUT);

Serial.begin(9600);
}

void loop()
{
Serial.print(digitalRead(ledpin));

delay(100);

digitalWrite(ledpin, HIGH);

delay(1000);

digitalWrite(ledpin, LOW);

delay(1000);
}

I want to use the serial monitor to count how many time's the LEd light come's on

Looking at that code, it should be obvious that the light comes on once per iteration of loop(). You need to create a global variable, or a static variable in loop() initialized to 0, and increment that variable in loop().

Set up a counter and increment it every time you set the LED high. Then print the count just like you are printing the LED status in your sketch.

How would i do this this is only my second sketch ever? thanks

How would I increment it every time the LED is high?? Is it a simple ++?

int ledpin = 12;
int counter = 0;

void setup()
{
  //set outpups
  pinMode(ledpin, OUTPUT);
  
  Serial.begin(9600);
}

void loop()
{
 Serial.print(digitalRead(ledpin));
 
 delay(100);
  
  digitalWrite(ledpin, HIGH);
  counter = counter + 1;  // or counter++ does the same thing
  Serial.print(counter);

  delay(1000);
  
  digitalWrite(ledpin, LOW);
  
  delay(1000);
}

ohh thanks soo much I thank both of you for your help now i can finally stop stressing over this I was so close and thanks!!!!!