At the moment the code counts the nodes posted by the user, but if you're using Domain Access then an addition to the SQL in _post_count_update should be used to check that the posts are visible on the current domain.