int[] numbers = {66,87,34,23,27,4}; int count = 0; foreach(int x in numbers){ count++; } Console.WriteLine(count);