Changed: Use a single query to fetch affected sessions for bans and group results by UID with a count.