Merge pull request #9078 from senny/6865_ar_count_with_uniq

`#count` in conjunction with `#uniq` performs distinct count.
Conflicts:
	activerecord/CHANGELOG.md