Costs required to attack are aggregated and are paid all at once, so Tax Taker’s ability will trigger only once when that happens. For example, if you control Ghostly Prison and an opponent attacks you with three creatures, they’ll have to pay {2} for each of those creatures, for a total of {6}. When they do, Tax Taker’s ability will trigger, and once it resolves, you’ll create six Treasure tokens.