Use a variable, and add 1 to it every time your character teleport.
Can you show me example how to do that?
Sorry for the late reply, I've been a little busy.
In your teleport state you'll need a varadd so:
[State 1000, Counter]
type = varadd
trigger1 = !time
v = 2
value = 1
What this controller does is add 1 to var(2) as soon as the teleport is initiated.
In your cmd for the move you should have:
[State -1, Teleport]
type = changestate
triggerall = Var(2) < 5
*insert your other triggers etc here*
So as long as var(2) is less than 5 (the number of teleports you wish to allow) the teleport will trigger.
The method JNP described is similar in principle, but the varadd would be replaced with:
[State 1000, Teleport_Count]
type = Explod
trigger1 = !time
anim = -1
postype = p1
id = 101
pos = 0,0
removetime = -1
And your cmd state would be
[State -1, Teleport]
type = changestate
triggerall = numexplod(101) < 5
*insert your other triggers etc here*