is it bad code?

Please, help me, what is bad in this code?

So sorry, my english is very bad, i am learning.
Well, i want do that a led turn on five times. then turn off.
the code that attachment is correct? else, where is the mistake?
Regards.
Hidalgo.

Parpadeo limitado.txt (1.18 KB)

First, for code that small, there is no reason to attach it. Just post it.

/*
  Parpadeo limitado
  Enciende un led un número determinado de veces.

 Reaizado el 11 de Nov. de 2015
  por Hidalgo Pérez
 */
int cuentaParpadeos=0;   //Inicializamos una variable contadora de parpadeos en cero
int parpadeosDeseados=5; //Inicializamos una variable de parpadeos deseados en cinco.

void setup() {  
  pinMode(13, OUTPUT);   // Inicializamos el pin 13 como salida.
}


void loop() {
  digitalWrite(13, HIGH);  // Encendemos el Led enviando un pulso alto.
   if(13==HIGH)            //Contamos los estados altos del led.
     cuentaParpadeos++;    //Guardamos los estados altos del led.
  delay(500);              // Esperamos medio segundo con el led encendido.
      if (cuentaParpadeos==parpadeosDeseados)  //Comparamos los estados altos del led almacenados con los deseados.
         parar();          //Si son iguales los parpadeos contados con los deseados se invoca la función parar.
  digitalWrite(13, LOW);   // Apagamos el led enviando un pulso bajo.
  delay(500);              // Esperamos medio segundo con el led apagado.

   
}
void parar(){               //Creamos una función para detener el destello del led
digitalWrite(13, LOW);
delay(5000);
}

Second, you need to tell us what the code actually does, assuming that it at least compiles.

  digitalWrite(13, HIGH);

Turning the internal pullup resistor on every time through loop() seems unnecessary.

   if(13==HIGH)            //Contamos los estados altos del led.

The constant HIGH has a value of 1. It it unlikely to ever equal 13.

Even if you correct those issues, and actually read the state of the pin that the switch is connected to, incrementing the counter when the switch IS pressed is wrong. It may be pressed for many, many iterations of loop(). Instead, you need to study the state change detection example, and only increment the counter when the switch BECOMES pressed.

Turning the internal pullup resistor on every time through loop() seems unnecessary.

It's an output No pullup involved.

Yes, the code compiles but the code does not work. I change the line "if(13==HIGH) " for "if(13==1)" and nothing. I know... this is very easy but i am learning arduino y i want experiment changing for practice. How i do for count how many times a led turn on?

13 is not going to equal 1. It's that simple.

I change the line "if(13==HIGH) " for "if(13==1)" and nothing.

Because 13 is not HIGH or 1 (which are the same value).

Most likely, you want

  if(digitalRead(13) == HIGH)