Here's a little tutorial on transferring buildings to cash, but it seems that concept isn't your problem, so instead, I would recommend using Binary Count-Offs to remove the units, of course, there are some problems with using it on units, because Bring won't update correctly, so it puts a twist on the solution.
So, to transfer 15 units in a single trigger cycle, your binary count-offs would look like this:
Conditions:
Player x brings at least 8 [any unit] to Anywhere
Switch Transfer is set
Actions:
Give 8 [any unit] to (Unused Computer)
Add 8 Gas to Player x
Remove (Unused Unit)
Preserve Trigger
Conditions:
Player x brings at least 4 [any unit] to Anywhere
Rest is same as above, use 4 instead of 8
Conditions:
Player x brings at least 2 [any unit] to Anywhere
Rest is same as above, use 2 instead of 8
Conditions:
Player x brings at least 1 [any unit] to Anywhere
Rest is same as above, use 1 instead of 8
The Remove at the bottom is necessary to ensure Bring updates, otherwise you'll get extra gas each time it runs. Then just keep going up by powers of 2 depending on how many units you think you'll need to transfer at once.
However, you do have the problem of how often to do it, because each time you do that, you'll lose selection of all your units, so perhaps you'd need to use some way of detecting when to use it, rather than constantly doing it, it would also create excessive lag doing it constantly.
None.