I'm wondering how I can request the amount of posts by passing certain arguments (you could see this as part of a "query"). See the example below.
$args = [ "numberposts" => -1, "post_type" => "jobs", "s" => "developer", "tax_query" => ["taxonomy" => "IT", "field" => "slug"] ]; $posts = get_posts($args); $count = count($posts);
I'm aware of the fact that the following function works perfectly for my case. However, it's extremely exhausting to execute. Instead of actually getting all posts within a query, I'm just looking for a function that just counts the posts with certain arguments.
Please bare in mind that I'm passing on certain meta_queries and tax_queries which will make some queries to the database fairly hard on itself already.
Hope someone can help.