• multiple post types, meta keys and relation keys without duplicating the code
  • re-calculates the total number of relations instead of adding +1
  • counts only if both related posts are published
  • updates the total count when the post is changing it’s status from published
  • updates the total count when the post is updated from the WordPress dashboard