<?PHP $num_cats = wp_count_terms('category'); echo $num_cats. '<br/>'; ?>
I get the number of total categories from the above code. How can I get the total categories based monthly archive? following code is not echoing the number of monthly archive:
<?php $num_month_cats = wp_count_terms (get_archives('monthly')); echo $num_month_cats; ?>
Read more here: How to count the number of monthly archive?