how do I load a new scene when 3 colliders (with different tags) are touching a separate collider that loads a new scene

using UnityEngine;
using System.Collections;
using UnityEngine.SceneManagement;

public class loader2 : MonoBehaviour
{

    public string Level = "Level_02";

    private void OnCollisionEnter2D(Collision2D collision)
    {
        if (collision.gameObject.CompareTag("Player"))
            SceneManager.LoadScene(Level);
    }
}

here is the code I am using to load a scene when one a gameObject tagged “Player” touches the gameObject with this code on it. I am trying to change it so it will only load a scene when 3 different players touch it at the same time (“Player”, “Player2”, and "Player3). How can I do this?

Hello.

Then you need just a counter. osmething like this:

 public class loader2 : MonoBehaviour
 {
 
     public string Level = "Level_02";
     int playerCount;

     private void OnCollisionEnter2D(Collision2D collision)
     {
         if (collision.gameObject.CompareTag("Player"))
             {
             PlayerCount++;
             if (playerCount>= 3) SceneManager.LoadScene(Level);
             }
     }
     private void OnCollisionExit2D(Collision2D collision)
     {
         if (collision.gameObject.CompareTag("Player"))
             PlayerCount--;
     }

 }

Bye!