GORM Playground Link

https://github.com/go-gorm/playground/pull/683

Description

I'm using postgres as reference and it looks like gorm does not format properly count if Distinct is called with more than one argument before it. I've tried manually inserting the raw sql with count(distinct(arg1, arg2, ...)) and it seems to work fine the database. gorm defaults to count(*) instead and uses distinct only in the Find query. I expect both of them to have distinct.

Related issue but not quite the same: #6790