Removes sortations for catalog counts

Sortation isn't neccessary for counting and it slows down the query
Filters records for duplicates before aggregation

This fixes the problem of counting product attributes in combination with a limit
Merge pull request #536 from nsendetzky/master

Fixes and optimizes aggregation