cakephp/cakephp — pull request #2704 by lorenzo (2014-01-23 18:48:15+00:00)
Title: 3.0 better count

Improved the `Query::count()` method. Now it will work consistently when having `group by` or any formatting function. Also added a way to register a callback that will be used instead of Query::count() when present, this allows to have full control over the count query or to just return an estimated number of rows.