As turbine king said you have a maximum of six sittings and 3 attempts
Actually, it's four attempts. Best way to maximise your chances is to split it down into 3, eg, 5-5-4. That means by the third sitting you have attempted each subject once, leaving 3 sittings and 3 attempts at each of the subjects you failed first time round. What you don't want to have is more attempts left at a subject than you have sittings remaining, 'cos that's just wasting chances.
TB