Loopcounter issue c sharp - C#