How to count items of meta query?
$query->found_posts may be what you are looking for from the code reference: https://developer.wordpress.org/reference/classes/wp_query/ Note that meta_query expects nested arrays, even if you only have one query. You may need to use: $meta_query[0][] = array( ….. You should also take care with the form of the original query. If there are one or more relations defined, … Read more