count WP_Query($args) code example Example: wp_query item count <?php $count = $custom_posts->found_posts; ?>