patrol enemy after third time collision

ok I got a character who I can punch for three times in its face I want it to start moving on x-axis and patrol. how?
Game Editor discussion board
http://game-editor.com/forum/
if(variable>=3)
{
do stuff...
}