handle count only for aggregate queries
Merge remote-tracking branch 'upstream/develop' into PLFM-3075
Merge pull request #1584 from marcel-blonk/PLFM-3075

Plfm 3075