The double relative classifies; things which came under the category of gain. Compare Gal 4:24; Col 2:23.
Gain (κέρδη)
Lit., gains. So Rev., in margin, and better. The various items of privilege are regarded separately.
I counted loss (ἥγημαι ζημίαν)
Better, as Rev., have counted. The perfect tense implies that he still counts them as loss. See on Phi 3:8. Notice the singular number loss, and the plural gains. The various gains are all counted as one loss.