Changing Variable OnMouseClick? Help!

Hey everyone. I'm trying to attach the following script to a box to allow me to set a maximum number of items inside, and what I want is for that number to decrease by one each time I click it. This has been stumping me for quite a while and if someone can help me correct my code I'd really appreciate it. I'm a beginner and I'm sure its something simple, but please explain where I went wrong in simple terms as I'm not familiar with ALL of the scripting jargon yet. :-) Thanks a lot in advance.


var maxCount : int = 10;

var presentCount : int = 10;

    function OnMouseClick(){

    presentCount -= 1;

    }

    function Update(){

    if (presentCount <= 0)
       {
          Destroy(gameObject);
       }

    }

Where is OnMouseClick called? Did you mean OnMouseDown? Does your object also have a Collider component attached? If not, OnMouseDown never gets called.