Amount of attempts divided by (amount of classes unlocked +1)
So if you fail 10 times in a row then already you hit the max of 10, however if you then passed you would only have 5 or 6 for next climb. Pretty sure it's rounded down. As at that point you would have 11/2 from the above calculation