Counter that goes back to 0 and up again

Hi. I want a counter to go +1 up everytime I press the Button ‘L’ and when bigger than the count of a list go back to value 0 and +1 again everytime i press ‘L’. The value represents the index of a specific GameObject in a List. The order in the List can be changed, so I need to find out first, everytime I press ‘L’, at which position this GameObject is and count up from this value. I wrote this, but it seems not to work. If I log it, the counter goes up correctly the first time and then back to 0. But then it stays at the value 1. I think it must be, because the value is after one loop always at 0 and then the ++ counts it up to 1. But I just don’t know, what I’m doing wrong. Does anybody see my mistake?

void Update ()
{
	if (Input.GetKeyDown(KeyCode.L))
	{
		i = someList.IndexOf(GOinList);
		i++;
		if (i > (someList.Count -1))
		{
			i = 0;
		}
	}
}

var Counter : int;

var Threshold : int = 4;

function Update()
{
	if(Input.GetKeyDown(KeyCode.L))
	{
		if(Counter < Threshold)
		{
			Counter ++;
			
		}
		else
		{
			Counter = 0;
		}
	} 
}