Checking if colliding with anything in a layer

Hello to the people of unity answers!

I am trying to figure out how to make my player character in a 2D game die whenever they aren’t colliding with any colliders in a certain layer, effectively creating a boundary they must stay inside. The problem is there are multiple overlapping colliders in the layer and simply killing the player upon exiting one won’t work. Here is a small bit of code:

void Update ()
	{
		if (boundariesTouching < 1 & respawning == false) //If the player is not in a boundary and not respawning then kill them.
			StartCoroutine (Respawn ());  //Teleports the player back to origional start point after short delay and animation.
	}

	void OnTriggerEnter2D (Collider2D collider)
	{
		if (collider.gameObject.layer == safeLayer) //If the player enters a boundary add one to the boundariesTouching variable.
		{ 
			boundariesTouching++;
			print ("Player is in " + boundariesTouching + " boundaries");
		}
	}

	void OnTriggerExit2D (Collider2D collider)
	{
		if (collider.gameObject.layer == safeLayer) //If the player leves a boundary subtract one from the boundariesTouching variable.
		{
			boundariesTouching--;
			print ("Player is in " + boundariesTouching + " boundaries");
		}
	}

The problem with this system is that when the player falls out of the boundaries, they are teleported back to the original starting point, which for some reason only sometimes doesn’t count as colliding with the boundaries, and kills the player again. The only reason I can think it does this is when the player dies and is teleported back to start, the player’s rigidbody simulation is turned off for a brief time. I don’t know how to stop the rigidbody from being simulated while still letting colliders function.

Other than raycasting into the layer every frame, I’m clueless here.

After modifying how the player respawns I solved it. It turns out that turning off the rigidbody’s simulation did indeed cause the collision to not register.