nhibernate/nhibernate-core — pull request #39 by hazzik (2011-12-22 09:18:04+00:00)
Title: Fix for NH 2722 - Linq Count() does not respect previous calls to Select() or Distinct()

```
session.Query()
.Select(x => x.Property)
.Distinct()
.Count()
```
Results in a `count(*)` query being executed, rather than a `count(distinct Property)` query.

```
session.Query()
.Select(x => x.Property)
.Count()
```
Results in a `count(*)` query, rather than a `count(Property)` query.

JIRA: https://nhibernate.jira.com/browse/NH-2722