title: Help with simple Linq count statement
body: <pre><code>var q = dc.tblHelpCentreQuestions.Where(c =&gt; c.userID == UserID);
  q.OrderByDescending(c =&gt; c.dateSubmitted);
  </code></pre>
  
  <p>This works fine, but I also need to return the count of records returned from <code>tblHelpCentreReplies</code> where <code>QuestionID</code> equals <code>tblHelpCentreQuestions.ID</code>.  This is easy enough for me in SQL, can someone show me how this is done in LINQ to SQL?</p>
  
  <h2>Edit</h2>
  
  <p>I've got as far as this:</p>
  
  <pre><code>var q = 
  from question in dc.tblHelpCentreQuestions
  join replies in dc.tblHelpCentreReplies on question.ID
      equals replies.ticketID
  where question.userID == UserID
  orderby question.dateSubmitted descending
  select new { question, replies.Count() };
  </code></pre>
  
  <p>But replies.Count() throws:</p>
  
  <blockquote>
    <p>Invalid anonymous type member
    declarator. Anonymous type members
    must be declared with a member
    assignment, simple name or member
    access.</p>
  </blockquote>