How to add a counter on screen!

I’ve created this script in javascript.
var endTime : float;
var textMesh : TextMesh;

function Start()
{
endTime = Time.time + 60;
textMesh = GameObject.Find ("Timer").GetComponent(TextMesh);
textMesh.text = "60";
}
 
function Update()
{
var timeLeft : int = endTime - Time.time;
if (timeLeft < 0) timeLeft = 0;
textMesh.text = timeLeft.ToString();
}

Would i need to add a guitext and change some code?

If you want just simple plain text you could just use the OnGUI method:

var Counter : float;

function Update()
{
	Counter += Time.deltaTime;
}

function OnGUI()
{
	GUI.Label (Rect (Screen.width / 2 - 50, Screen.height / 2 - 50, 100, 100), Counter + "");

}