title: SharePoint's List.GetItems(view) returns ALL items instead of filtered view items
body: <p>I'm trying to get a count of items in a list, based on a view. Every method I've tried so far only returns the grand total of the list. I've tried just about every method I've run across while searching, and everything ends up with the same results.</p>
  
  <p>Here's one of the methods I've tried:</p>
  
  <pre><code>SPWeb web = SPContext.Current.Web;
  SPView view = web.GetViewFromUrl("url to my view");
  int count = view.ParentList.GetItems(view).Count;
  </code></pre>
  
  <p>My list has 28 items, but the view I'm referencing filters it and shows four items. I expect my count to be 4, not 28 - but 28 is what I always get.</p>
  
  <p>Here's another method I've tried:</p>
  
  <pre><code>SPSite site = SPContext.Current.Site;
  SPWeb web = site.OpenWeb();
  
  SPQuery MyQuery = new SPQuery();
  MyQuery.Query = "&lt;Query&gt;&lt;Where&gt;&lt;Eq&gt;&lt;FieldRef Name='strStatus' /&gt;&lt;Value Type='Text'&gt;submitted&lt;/Value&gt;&lt;/Eq&gt;&lt;/Where&gt;&lt;/Query&gt;";
  
  IEnumerable&lt;SPListItem&gt; results = web.Lists["Requests"].GetItems(MyQuery).Cast&lt;SPListItem&gt;();
  
  // results.Count() is 28...  should be 4
  </code></pre>
  
  <p>So in this method I'm skipping the view and just trying to pass in a CAML query. When testing my query in U2U, four results are returned as expected... </p>
  
  <p>The larger picture is that I'm doing this inside of my custom menu control's OnMenuItemDataBound event handler. I don't know if that makes a difference at all, but the idea I'm heading towards is that each item that links to a view in a specific list, will show the count of items in that view next to the link.</p>
  
  <p>Any ideas why I'm getting a list total instead of the filtered totals? Thanks!</p>