restrictions passcode how many attempts
Note that when you set up your passcode, there is an option to erase data after too many failed attempts. If you have this option selected, your phone will erase all the data after 10 failed passcode attempts.