This statement corrects all the comment count in WP posts by querying every posts actual comments:
UPDATE wp_posts p SET p.comment_count = ( SELECT count(*) FROM wp_comments WHERE comment_post_id = p.id AND comment_approved = 1 );