How to count seconds while mouse is pressed?

I have a very simple problem, but I trough it should be easier.

What I need is:

1 - While some mouse button is pressed, a counter starts running on a loop, it goes from 1 to 5. When the counter reaches 5, it stars again from 1.

What I’ve done already:

1 - I can detect when mouse button is pressed and released whitout any problem. So that’s not a problem.

2 - I tried to make a loop using “for” and later “while” but Unity3D crashes. So I tried time.deltaTime, but I don’t know how to count the time while mouse is pressed.

Here is how you would count how long it's been since a button was clicked.

var  buttonPressTime  :  float  =  0.0;

var  buttonRect       :  Rect   =  Rect(200, 200, 120, 40);
var  labelRect        :  Rect   =  Rect(200, 240, 120, 40);

function OnGUI ()
{
    if ( GUI.Button(buttonRect, "Start Timer") ) {
        buttonPressTime = Time.time;
    }

    var timeSince : float = Time.time - buttonPressTime;

    GUI.Label(labelRect, "Time since: " + timeSince);
}