I don't know why being on iPhone would matter, but what you'd do is declare an integer like
var falls = 0;
Then every time you detect that the player has 'fallen' (apparently this means y below 2), you increment that variable
falls++;
But you don't just do that on every frame, you do that only the first time you detect that the player has gone below 2. So you might have another variable