When I use the following custom query
$wp_comments = $wpdb->get_results("SELECT COUNT(*) FROM wp_comments WHERE userid=$userid")
If I use
print_r(wp_comments)
I get the following printed
Array ( [0] => stdClass Object ( [COUNT(*)] => 10 ) )
10 is the count I am expecting, how to print out the value?
Is there any other way to get the number of comments made by the user on the whole site?