Tex. R. Civ. P. 303

As amended through February 20, 2024
Rule 303 - On Counterclaim for Costs

When a counterclaim is pleaded, the party in whose favor final judgment is rendered shall also recover the costs, unless it be made to appear on the trial that the counterclaim of the defendant was acquired after the commencement of the suit, in which case, if the plaintiff establishes a claim existing at the commencement of the suit, he shall recover his costs.

Tex. R. Civ. P. 303