One way to do it would be to run two custom queries like this:
$normal_post_args = array(
'post_type' => 'post',
'category_name' => 'hobby'
);
$normal_posts_query = new WP_Query( $normal_post_args );
$movie_post_args = array(
'post_type' => 'movie',
'category_name' => 'hobby'
);
$movie_posts_query = new WP_Query( $movie_post_args );
echo "Posts (" . $normal_posts_query->found_posts . ")";
echo "Movies (" . $movie_posts_query->found_posts . ")";
This should give you something like Posts (5)
and Movies (3)
. That’s a starting place. Then it’s just a matter of wrapping this in a function and referencing it in your template file.
Update:
Based on your comments, the best way I can think of to do this would be to create your own category list, rather than using the default WP one.
Something like this:
$categories = get_terms( 'category');
if($categories):
echo "<ul>";
foreach($categories as $cat):
$cat_posts = get_posts('post_type=movie&category=' . $cat->term_id . '&numberposts=-1');
if($cat_posts):
echo "<li>" . $cat->name;
$count = count($cat_posts);
echo " ($count)";
echo "</li>";
endif;
endforeach;
echo "</ul>";
endif;