Custom Function not working ?

Can somebody tell me why the custom function (think that’s the right term) the function newFunction part of my script doesn’t work.
I get no errors and the rest of the script works fine but it’s like the newFunction is just completely ignored by the game ?

#pragma strict 
       
public var Boulder : GameObject;
public var BoulderLimit : int; // the max amount of Boulders that can be spawned    
public var BoulderCount : int; // the current amount of spawned Boulders    
public var spawnBoulder : boolean; // if the Boulders are allowed to spawn
    
function Update ()
{
    if ( BoulderCount < BoulderLimit ) // check if the current spawn amount is below the limit  
    {
        SpawnBoulder (); // spawn the Boulder
    }
    else
    {
        spawnBoulder = false;
        Debug.Log ( "Spawn Limit Has Been Reached!" );
    }
}
    
    
function SpawnBoulder () // spawn the GameObject
{
    Instantiate(Boulder, transform.position, transform.rotation);
    BoulderCount++; // add to the current amount of spawned Boulders
    Debug.Log ( "Spawned GameObject #" + BoulderCount );
    
    newFunction();  
}
    
function newFunction()
{
    yield WaitForSeconds(8);
    BoulderCount--;
    Debug.Log ( "Boulder Count Reset!" );
}

Any ideas guys ?

Your functions needs to be upgraded to a coroutine.

yields and waitforseconds can only be used there.