Ahem. You guys aren't exactly right.
AFAIK there is no limitation on the number of idevices you can sync with one iTunes account. The limitation is 5 computers can be authorized with a single iTunes account. And you can sync as many iDevices with each computer as you like. But in your case you want to download apps on your friends iPhone bought in your account. Now that will break apples Terms and conditions with you. Apple clearly states you need to own all the devices in order to install the apps on them. So what you'll be doing isn't allowed. Wether you chose to still download your apps on your friend's iPhone is your decision and you'll be fine unless apple has some way to find out if all the devices are owned by you or not.
Also another limitation is that a maximum of 5 iTunes account can be synced with one idevice. If you for some reason have more than 5 accounts authorized with your iTunes you'll have to choose only 5 of those account for each of your iDevice. Though I can't think of anyone using that many accounts. I personally use two. One for free promo code apps and another one for paid apps. Helps me keep things clean but not really required.
So to sum it up, it's 5 computers per iTunes account. Unlimited iDevices per computer. And 5 iTunes accounts per iDevice. 🙂