How to implement a singleton

I have made a script with a counter in it, and then to make this counter keep count through the whole game, I am using DontDestroyOnLoad (transform.gameObject);. There is just the problem, that when i start on the first scene nothing is wrong but, then when I have played through a level and is back on the main scene, the counter(which is displayed) has been duplicated. I saw something about implementing a singleton in another thread, but I didnt really understand how I would implement it into my script. Do I have to make a seperate script with the singleton in, and then connect it to the script with the counter or what would the best way of doing it be?

Script:

static var energyObj : int = 5;

var counter : float;

function Awake () {
DontDestroyOnLoad (transform.gameObject);
}

function Start()
{
counter = 1800;
}

function Update () {
 
 if (energyObj < 5) {
  counter -= Time.deltaTime;
     if(counter <= 0){
        energyObj += 1;
        counter = 1800;
        Debug.Log("Energy is " + energyObj); 
		}
 	}
 	
 energyObj = Mathf.Clamp(energyObj, 0, 5);
 
 if (energyObj > 5) {
 		energyObj = 5;
	}
 if (energyObj < 0) {
 		energyObj = 0;
 	}
}

function OnGUI () {

if (energyObj < 5) {
	var minutes = Mathf.Floor(counter / 60).ToString("00");
	var seconds = (counter % 60).ToString("00");
	GUI.Label(new Rect(100,40,400,40),"To Next: " + minutes + ":" + seconds);
	
	}

}

http://rockonflash.wordpress.com/2010/10/21/singletons-in-unity3d/

http://wiki.unity3d.com/index.php/Singleton

As an alternative to implementing a singleton class, you could simply destroy the duplicate when the scene is reloaded. There is a good reference on how to do this here.