Make a loop after making five times another loop

Hi,
I want that arduino makes a loop if it has done another loop five times, but i don't know how to do it.
Help please.

i = 1;
while (...)
  {
  ...
  if ( i > 5)
    {
    while (...)
      {
      ....
      }
    }
  i = i + 1;
  }
void loop()
{
  for (int x = 0; x < 5; x++)
  {
    //code to be executed 5 times
  }

  for (int x = 0; x < someOtherNumber; x++)
  {
    //code to be executed someOtherNumber of times
  }
}

@TeodoroTechnology, you can see that there are different ways to do this, perhaps solving different problems. If the previous posts aren't applicable, then explain more about what you are trying to do.