title: QueryOver<A>().Where(a => a.B.Count() > 0) does not work
body: <p>I get an exception: <code>Unrecognised method call in epression a.B.Count()</code> when I run:</p>
  
  <pre><code>var query = session.QueryOver&lt;A&gt;()
      .Where(a =&gt; a.B.Count() &gt; 0)
      .List();
  </code></pre>
  
  <p>The following code works:</p>
  
  <pre><code>var query1 = session.QueryOver&lt;A&gt;().List();
  var query2 = query1.Where(a =&gt; a.B.Count() &gt; 0);
  </code></pre>
  
  <p>Any ideas? Thanks.</p>
  
  <hr>
  
  <p><strong>Edit:</strong></p>
  
  <p>Here is my mappings. I'm using NHibernate 3.1.0.4000:</p>
  
  <p>Models:</p>
  
  <pre><code>public class A
  {
      public virtual int Id { get; private set; }
      public virtual ICollection&lt;B&gt; Bs { get; set; }
  }
  
  public class B
  {
      public virtual int Id { get; private set; }
  }
  </code></pre>
  
  <p>Mappings:</p>
  
  <pre><code>public class AMappings : ClassMap&lt;A&gt;
  {
      public AMappings()
      {
          Id(x =&gt; x.Id);
          HasMany(x =&gt; x.Bs).LazyLoad();
      }
  }
  
  public class BMappings : ClassMap&lt;B&gt;
  {
      public BMappings()
      {
          Id(x =&gt; x.Id);
      }
  }
  </code></pre>
  
  <p>Rest of my code:</p>
  
  <pre><code>class Program
  {
      static void Main(string[] args)
      {
          // Create connection string
          string connectionString = new System.Data.SqlClient.SqlConnectionStringBuilder()
                                     {
                                        DataSource = @".\r2",
                                        InitialCatalog = "TestNHibernateMappings",
                                        IntegratedSecurity = true
                                     }.ConnectionString;
  
          // Create SessionFactory
          ISessionFactory sessionFactory = Fluently.Configure()
          .Database(MsSqlConfiguration
                        .MsSql2008.ConnectionString(connectionString)
                        .ShowSql())
          .Mappings(m =&gt; m.FluentMappings
              .Add(typeof(AMappings))
              .Add(typeof(BMappings)))
          .ExposeConfiguration(BuildSchema)
          .BuildConfiguration()
          .BuildSessionFactory();
  
          // Test
          var session = sessionFactory.OpenSession();
  
          // This line works OK
          var query1 = session.Query&lt;A&gt;()
              .Where(a =&gt; a.Bs.Count() &gt; 0);
  
          // This line throws exception: Unrecognised method call in epression a.Bs.Count()
          var query2 = session.QueryOver&lt;A&gt;()
              .Where(a =&gt; a.Bs.Count() &gt; 0);
      }
  
      static void BuildSchema(Configuration cfg)
      {
          new SchemaExport(cfg).Create(false, true);
      }
  }
  </code></pre>