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.
Online purchase from Apple seemingly assumes that one device may be traded in a single transaction. Given that you intend to purchase two iPads, by far the simplest solution is to split the two new iPads into two individual transactions - and trade-in one device. The overall cost to you, for of the two new iPads with trafe-in, will be no different.
Many choose to complete their trade-in in-store - as doing so removes the online single-item limit - and any uncertainty as to the trade-in value or acceptance.