$counts = wp_count_comments();
this will return total comments for blog
But if you want to get total comments of a post, then
$counts = wp_count_comments( $post_id );
$counts = wp_count_comments();
this will return total comments for blog
But if you want to get total comments of a post, then
$counts = wp_count_comments( $post_id );