Horje

Do your posts have multiple categories? Ift - I think inpidual category counts are cached, so can sum up counts:



$categories = get_categories( array( 'exclude' =>
 $folio_cat_ids ) );
$count = 0;
foreach ( $categories as $category) $count += $category->
category_count;

Can also just get and count the posts, that is more flexible and takes care of overlap, but also more resource-intensive:



$posts = get_posts( array( 'category__not_in' =>
 $folio_cat_ids, 'numberposts' =>
 '-1'
) );
$count = count( $posts );


More Solution
Reffered: https://wordpress.org/