Collectable objects are being counted more than once?

I am making a game where you go around collecting gems. There are 15 gems. My collection script is the following:

static var Count : int = 0;
var CollectSound : AudioClip;
private var timeSinceLastCollision = 0;

function OnControllerColliderHit(hit:ControllerColliderHit){
    if(hit.gameObject.tag == "Gem" && timeSinceLastCollision <= 0) { 
        Destroy(hit.gameObject);
        Count++;
        audio.PlayOneShot(CollectSound);
        timeSinceLastCollision = 3;
        //Wait at least 3 seconds between collisions
    }
    timeSinceLastCollision -= Time.deltaTime;
}

The script for the GUI Text is this:

function Update () {
    var prefix = "Gems: ";
    var suffix = "/15";
    guiText.text = prefix + GemCollect2.Count + suffix;
}

When I play the game the gems will randomly count more than one. There are some times that this does not happen. Usually this happens to one gem (a different one each time played) and then the others work fine. Any thoughts?

I'm not sure why you are getting an OnControllerColliderHit more than once per gem. It could be related to the Destroy not having an effect until the end of the current frame, and maybe the collision logic can generate several collision events per frame. Anyway, here is a way you could avoid it:

Attach a script to each gem which has a boolean variable called `collected`. When a gem is collected, set its `collected` variable to true. When doing the counting, ignore gems that already have their `collected` variable set to true.

The randomness might be a product of relying on a time. You might try something like this:

var canCollect : Boolean = true;

function OnControllerColliderHit(hit:ControllerColliderHit){
    if(hit.gameObject.tag == "Gem" && canCollect) { 
        deactCollect();
        Destroy(hit.gameObject);
        Count++;
        audio.PlayOneShot(CollectSound);
        Invoke ("actCollect", 3.0);
    }else{
      //still waiting
    }
}

function deactCollect(){
   canCollect = false;
}

function actCollect(){
   canCollect = true;
}

My guess is, it's a problem with OnControllerColliderHit (which I've never even heard of before). You may want to try translating that to the original function OnCollisionEnter (they may be able to work in tandem, too).

Also, and I'm not sure this is the issue, but if you don't need "Static" on your Count variable, don't put it there, as it's unnecessary and only creates confusion, especially if you don't fully understand what it does.