Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.