title: Does calling Count on IEnumerable iterate the whole collection?
body: <p>Consider the following code:</p>
  
  <pre><code>static IEnumerable&lt;int&gt; GetItems()
  {
      return Enumerable.Range(1, 10000000).ToArray();  // or: .ToList();
  }
  
  static void Main()
  {
      int count = GetItems().Count();
  }
  </code></pre>
  
  <p>Will it iterate over all the 10 billion integers and count them one-by-one, or will it use the array's <code>Length</code> / list's <code>Count</code> properties?</p>