{exp:playa:total_coparents}

You can use the {exp:playa:total_coparents} tag to get the total number of entries that share a common child with other entries.

{exp:playa:total_coparents} supports almost all of {exp:channel:entries}tag parameters, as well as the following:

entry_id
The main entry’s ID(s). If your tag is within an {exp:channel:entries} tag pair, this will default to the current entry’s ID.
coparent_id
The co-parent entry ID(s) to include. Prefix with “not ” to define entries to exclude instead.
child_id
The child entry ID(s) that the co-parents must have in common. Prefix with “not ” to define entries to exclude instead.
field
The Playa field’s name where the relationships were made, or the Matrix field’s name if your Playa field lives within a Matrix field.
field_id
The Playa field’s ID where the relationships were made, or the Matrix field’s ID if your Playa field lives within a Matrix field.
col
The Matrix column’s name where the relationships were made.
col_id
The Matrix column’s ID where the relationships were made.
row_id
The Matrix row’s ID where the relationships were made.