Add support to count distinct rows based on multiple columns using Postgres

This pull request complements the pull request #474 adding support to count distinct with multiple columns using Postgres.