Conteo de elementos wp_query
<?php $count = $custom_posts->found_posts; ?>
Wandering Walrus
<?php $count = $custom_posts->found_posts; ?>