How can I count 1 at a time?

i have made a project with unity where i use my mouse to click on an archery target. for that i made a counting script that gives me points when i click the target.
my problem is that when i click it counts to much points. can enyone help me out?
i also need to place a cross where i clicked and that has to disapear after 1min. but i don’t know how to do it.
any idees?

counting script:

`using UnityEngine;

using System.Collections;

public class Count : MonoBehaviour
{

public bool isClicked = false;
public GUIText countText;
private int count;


public void Start()
{
	count = 0;
	SetCountText ();
	if(gameObject.GetComponent<Collider> () == null)
		gameObject.AddComponent<BoxCollider> ();
}

public void OnMouseDown()
{
	isClicked = true;

}

public void OnMouseUp()
{
	isClicked = false;
	
}

public void OnGUI()
{
	if (isClicked) 
	{
		GUI.Label (new Rect (5, 5, 400, 100), " This is " + this.name);
                    count = count + 1;
	        SetCountText ();
	}
}
void SetCountText ()
{
	countText.text = "Count: " + count.ToString ();
}

}
`

Because you increase in the OnGUI and this method is called once or twice per frame.

You should not do any increasing in the OnGUI, more likely in the Update.

And even there it is still wrong since the Udpate runs at different speed on different computers.

Best is then the update using the Time class:

void Update()
{
   if(isClicked) count += Time.deltaTime;
}

this will increase your count using the time class. After one second, you should have an approximate value of 1. You can speed that up multiplying the value:

void Update()
{
   if(isClicked) count += Time.deltaTime * speed;
}

If speed is 2, you get 2 pts per second, if 0.5 you get 1 pt after 2 sec

If you only want to add one to count when the mouse button is pressed, just put the counting directly to OnMouseDown. Remember to also remove it from your OnGUI.

public void OnMouseDown()
{
    isClicked = true;
    count += 1; //this means the same thing as count = count +1;
}