modxcms/revolution — pull request #513 by grachov (2013-04-17 22:11:27+00:00)
Title: Fixed xPDO::getCount behaviour when query has grouping

Before fix this example
```php
$command = $modx->prepare('SELECT COUNT(*) FROM (SELECT id FROM ' . $table . ' GROUP BY id) t');
$command->execute();
$criteria = $modx->newQuery('modResource');
$criteria->groupby('id');
echo $command->fetchColumn() . ' vs ' . $modx->getCount('modResource', $criteria);
```
will return `N vs 1` and after fix it will output `N vs N` where `N` is the number of the rows in the `*site_content` table.