title: NotSupportedException: LINQ to Entities does not recognize the method
body: <p>I'm trying to make this query work with EF but it throws an exception:</p>
  
  <pre><code>var c = ac.Communities.OrderBy(o =&gt; o.Posts.Count())
          .Skip(page*limit)
          .Take(limit)
          .Select(o =&gt; o.ToViewModel()).ToArray();
  </code></pre>
  
  <p>The <code>ToViewModel()</code> method from the <code>Community</code> model looks like this:</p>
  
  <pre><code>public CommunityModel ToViewModel()
  {
      return new CommunityModel()
      {
          category = Category.Name,
          created = CreationTime,
          description = Description,
          id = Id,
          name = Name,
          ownerId = Owner.Id,
          postsCount = Posts.Count(),
          score = Posts.Sum(o =&gt; o.Likes - o.Unlikes),
          shortDescription = ShortDescription,
          subscribersCount = Subscribers.Count(),
      };
  }
  </code></pre>
  
  <p>What am I doing wrong?</p>