global $wpdb;
$user = get_userdata( $comment->user_id );
$user_id = $user->ID;
$comment_count = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) AS total FROM $wpdb->comments WHERE comment_approved = 1 AND user_id = %s", $user_id ) );
echo $comment_count;