You can trade-in as many qualifying devices as you wish - either in-store at a physical Apple Store, or using the online trade-in process:
Apple Trade In - Apple
Each device is assessed its own right. If using the online trade-in, you will be sent a shipping kit for each device. Devices are returned, assessed and a credit value assigned. The trade-in value is returned to you by way of an Apple gift card for each device - and these can be used to purchase whatever you wish with Apple.
If a trade-in is initiated during an online purchase, you will usually pay full price for the item - but will receive a refund against your credit card upon subsequent return (and acceptance) of the item that was returned for trade-in.
Many choose to complete their trade-in in-store - as doing so removes any uncertainty as to the trade-in value or acceptance.