For Ranger School, you are required to bring five combination locks. You can bring 1 additional lock for unauthorized bags if coming from overseas unit or TDY enroute.
For Sapper Leader Course, you are required to bring three combination locks.
For Airborne, you are required to bring two combination locks.
For SFAS, you have the option to bring three combination locks.
Locks that require a key are unauthorized for all the courses listed above.
I would recommend bringing the "Set-Your-Own Combination" locks and setting them all to something you'll easily remember like the last four of your SSN or your phone pass-code. They are more expensive, but only having to remember one code is worth it. When I went through Ranger there were people who bought the cheap locks and forgot the code because the RI's had them frazzled and they were tired. You're setting yourself up for failure if you believe you will remember five or six different combinations.