# WP Query Show Post Count when Paginating results

Let’s say that you doing a custom query, and their is pagination in place, and you want to show :
“Displaying 2 out of 5 results” (2 results on this page, and you have 5 total in all of the pages).

The way to do get the post count and present it nicely is:

    $custom_query = new WP_Query( $custom_args ); 
     if ( $custom_query->have_posts() ) {
         echo “displaying : $custom_query->post_count()";  // how many on this page
         echo “out of total of: $custom_query->found_posts";  // how many total found
    }