I want to count taxonomy terms for one (or per) vocabulary. I know, it can be done via views with aggregation but I wonder if there is another way to do this without using views.
There is a taxonomy vocabulary. There are terms in this vocabulary. I want to learn how many terms are there in this vocabulary.
Is there a method to show term counts as node count below?
<?php $counter = db_query("SELECT count(nid) FROM {node} WHERE node.type='page' AND node.status=1")->fetchField(); ?>