Hi there... take a look at this

Code:
var counter;

action hand_spin()
{
	player = my; //you may take an other entity
	
	while(1)
	{
		my.tilt += 5*time_step; //spins the entity
		if(player.tilt > 360){player.tilt = 0; counter ++;} 
                //if its tilt is above 360 set it 0 again and increase the counter var
		wait(1);
	}
}

PANEL* clockhand_pan = //shows the tilt and counter var on screen
{
	digits(5,5,"TILT: %.0f",("Arial#20"),1,player.tilt);
	digits(5,25,"COUNTER: %.0f",("Arial#20"),1,counter);
	flags = VISIBLE;
}



I hope that helps.