Count total number of post in foreach loop

Edit: Re-reading your question I noticed I may have mixed some things up, but the point remains that you should combine these separate queries performed inside the loop, by using variables inside the loop to create a comprehensive list of the query arguments that you can use to perform one query outside the loop.

I’ve unfortunately got no time to provide a more detailed answer.


Original post:
You’re getting 1 1 1 because you’re performing a separate query for each user.

You can combine these queries into one query and then $arg_query->post_count will work as you want it to. To do this, use the foreach loop to get all author ids, storing them in an array. Then after the foreach loop is finished you perform the query, using the stored author ids for the author arg.

The WP_Query codex page shows this basic example for querying posts from multiple authors:

$query = new WP_Query( 'author=2,6,17,38' );

btw, why use get_userdata() if you’re only using it to get the user ID, which you already have?