[stable-6] Count user's votes by subquery
Backport of #3477
@come-nc I plan a new beta-release for tomorrow, since we got a request for the release before the end of this week. We can wait with this PR after it to get no risky situation.
@dartcafe Ready for review, this helps a lot with performances in my testing.
BTW: Would you mind to add the grouping statements to the mappers, since the postgre error occured again. https://github.com/nextcloud/polls/pull/3394#issuecomment-2026953920 Also see this comment
BTW: Would you mind to add the grouping statements to the mappers, since the postgre error occured again. #3394 (comment) Also see this comment
I will open a backport for #3394 for stable-6.