В общем вопрос решен (может и не совсем верно, но работает). 
Спасибо 
Артем Золин указал правильное направление. 
Может кому то еще пригодится. 
Код добавить в functions.php 
function wp_cat_numb($id) {
	$category = get_category($id);
	$count = (int)$category->count;
	$taxonomy = "category";
	$array = array(
		"child_of" => $id
	);
	$tax_terms = get_terms($taxonomy, $array);
	foreach($tax_terms as $tax_term) {
		$count += $tax_term->count;
	}
	return $count;
}
На странице категорий (archive.php в моем случае) 
<?php
$category_uid = get_queried_object();
$category_posts = wp_cat_numb($category_uid->term_id);
echo $category_posts;
?>