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.