`#count` in conjunction with `#uniq` performs distinct count.

closes #6865
Merge pull request #9078 from senny/6865_ar_count_with_uniq

`#count` in conjunction with `#uniq` performs distinct count.