Once. The online pass is a single-use code, and redeeming it ties the entitlement to the account you entered it on. Enter it on a second profile and it will be rejected as already used.
That is why buying a pre-owned copy is a gamble. If the previous owner redeemed the pass, you will be prompted to buy your own to access the online modes, which can make a cheap second-hand disc poor value.
Keep the code somewhere safe until you are ready to redeem it, and enter it on the account you actually play on — there is no transfer once it has been used.