id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc,focuses 38280,Make term count for a specific object type available,desrosj,desrosj,"Term count is the total number of relationships with no context of the object types the relationships belong to. Currently, the best way to determine the count of a term for a specific object type is to run a `WP_Query` with a `WP_Tax_Query` for that term. {{{#!php $term_count_query = new WP_Query( array( 'post_type' => 'some-post-type', 'tax_query' => array( array( 'taxonomy' => 'some-taxonomy', 'field' => 'slug', 'terms' => array( 'term-slug' ) ), ), 'posts_per_page' => 1, ) ); $term_count_for_post_type = $term_count_query->found_posts; }}} Now that term meta is in core, it would be great if these counts were stored in term meta for easy access. To start, these counts could be available through a function. To go a step further, an argument could be added to `get_terms()` and other functions to filter the term counts and reflect the object types terms are being grabbed for.",enhancement,assigned,normal,Future Release,Taxonomy,4.7,normal,,has-patch has-unit-tests needs-refresh,,