I confirmed with Andy it does not. Here is a update query to fix all the existing attach_count mismatches:
Code:
UPDATE xf_post AS post
INNER JOIN (SELECT content_id, COUNT(content_id) AS count FROM xf_attachment
WHERE content_type = 'post'
GROUP BY content_id) attachment ON post.post_id = attachment.content_id
SET post.attach_count = attachment.count
WHERE post.attach_count <> attachment.count
After you run it you can check to make sure there are no more mismatches:
Code:
SELECT xf_post.post_id, S.count, xf_post.attach_count FROM xf_post
INNER JOIN (SELECT content_id, COUNT(content_id) AS count FROM xf_attachment
WHERE content_type = 'post'
GROUP BY content_id) S
ON xf_post.post_id = S.content_id
WHERE xf_post.attach_count <> S.count
DISCLAIMER: updating the database is risky business, and you should backup your site/database before doing so. I am not responsible for bad things that may happen