Spawn Point Problems

Hi guys so I am new to coding and need some help. This is the first code I’ve attempted to write on my own, and I cant seem to get it to work. Basically the idea is that when the player enters a certain box, it waits a period of time then spawns one monster. The problem is that A: It seems to spawn random numbers of monsters in the time it takes to process the code that tells it to stop, so one time it will spawn 50-100 another it will spawn 3 etc.
B: Anything will activate the trigger that starts the spawning. I can activate it by shooting it with my gun, or the enemies that spawn will activate it and create an infinite loop. I tried to follow the exact coding that someone else online wrote to specify only the player could activate it but with no effect.
The wait time function works between spawns, luckily.

var fight : boolean;
var minWait : int;
var maxWait : int;
var waitTime : int;
var spawn : boolean;
var enemiesSpawned : int;
var enemy : GameObject;
var player : GameObject;
var breach : boolean;

function Start()
{
fight = false;
spawn = false;
breach = true;
minWait = 5;
maxWait = 20;
waitTime = Random.Range(minWait, maxWait);
player = GameObject.Find("Player");
}

function Update()
{
if(fight == true && breach == true)

{
Encounter();
}
}
function Encounter()
{
spawn = true;
if(spawn == true)
{
Invoke("Spawn", waitTime);
}
}

function Spawn()
{
if(spawn)
Instantiate(enemy, transform.position, transform.rotation);
enemiesSpawned +=1;
NewWaitTime();
spawn = false;
breach = false;
}

function NewWaitTime()
{
waitTime = Random.Range(minWait, maxWait);
yield WaitForSeconds(waitTime);
Reset();
}

function Reset()
{
breach = true;
}

function OnTriggerEnter(other : Collider)
{
if(other.gameObject.tag == "Player")
{
	fight = true;
}
}
function OnTriggerExit(other : Collider)
{
if(other.gameObject.tag == "Player")
{
	fight = false;
}
}

Indenting will help both yourself and others read your code.

One way to put a hard limit on the number spawned would be like this, just define maxEnemies as you see fit:

function Spawn()
{
    if(spawn && enemiesSpawned < maxEnemies)
    {
        Instantiate(enemy, transform.position, transform.rotation);
        enemiesSpawned +=1;
        NewWaitTime();
        spawn = false;
        breach = false;
    }
}

If you wanted each wave to start fresh you would then set enemiesSpawned back to zero in OnTriggerEnter().