Group membership count for select groups across selected AD domains

I have a number of AD domains and need to monthly produce a report of the number of individuals in specific groups.  Presently, I have to run the "Domain Groups and Members", export to CSV and open in Excel to do a count of the users.  Due to nested groups, I need to select to "Expand Inline including members of Domain Users group".  Once in excel, I filter out only the actual users (no computers or nested groups as members) to get the final count across the domains.

I've looked at the Group Membership Count custom report but it is not flexible at all - can't even select the domain or what groups to focus on.

I've set up several SQL custom query reports, but since this involves handling nested groups, I don't know how to process that in SQL.

Ideally this would be the "Domain Groups and Members" with a summation option to just provide the count of the members, not the actual list of members.  For example:





Parents Reply Children
No Data