<?php $count = $custom_posts->post_count; ?>

<?php
// The Query
$query = new WP_Query( $args );
$total = $query->found_posts;
?>