Fix the wrong count of associated entries (#2697)
Fix the wrong count of associated entries (#2697)

The DISTINCT keywords was always returning 0 or 1.
Removing it makes the count working ok.

b10c4f67284da6eb3cb3a22a8598b44068fbb336 introduced the DISTINCT
keyword, but loads of other things, so it is hard to tell if something
made it not work.

Fixes #2455

Picked from 108da4f
Picked from 3da2f53376

jensscherbl/symphony,symphonycms/symphony-2,michael-e/symphony-2,jensscherbl/symphony,michael-e/symphony-2,bauhouse/sym-todo-list,symphonycms/symphony-2,bauhouse/sym-todo-list