Term count by user

It’s a little bit hard to guess, what are you trying to do exactly, but let me try to answer…

My best guess is that you want to tell, how many properties has given user published in given property type.

So first – why your code doesn’t work…

get_term will get the term info and there is no user context in it, so it will get count of all posts published in this term… So this won’t help you.

WP_Term_Query is almost the same function. And, if you’ll take a look at its reference, then you’ll notice, that there is no author param. So it also won’t help you.

Why is it so?

Because these functions are getting terms info and terms don’t have authors…

So how to get the count of posts in given term authored by given user?

The easiest ways will be to use WP_Query and use its found_posts field (which stores the total number of posts found matching the current query parameters)…

$posts = new WP_Query( array(
    'author' => $userID,
    'post_type' => 'property',  // I'm guessing that is your post type
    'tax_query' => array(  // here goes your taxonomy query
        array( 'taxonomy' => 'property_type', 'field' => 'slug', 'terms' => 'residential' ),
    ),
    'fields' => 'ids', // we don't need content of posts
    'posts_per_page' => 1, // We don't need to get these posts 
) );

echo 'Residential Properties: '. $posts->found_posts;