how to make a double jump for a character?

I know you need to select the action “allow re-jumping”, but the character jumps too much, how to make him jump only 2 times?

You can see one of my tutorial Here