As far as I know there is no limitation in number of attempts in AFMC and AIIMs. However there is an age limit in age in AFMC. The minimum age is 17 and upper age is 22. So if you cross 22 Years then you wont be eligible for the exam.
For AIIMS there is not limit for upper age however the candidate must be minimum 17 years of age.
The student must get 60% in his 12th standard