If in a given case the counterclaim be established, and the plaintiff nevertheless be found to be entitled to recover the property, the result would be two independent judgments, the one in no way tending to modify or interfere with the other. If the defendant should succeed in establishing his right of possession to the property, as well as his counterclaim, he would have two independent judgments. The statute does not contemplate such a result. (Pomeroy’s Code Pemedies, section 643.) Besides, the cause of action alleged in the counterclaim did not arise out of the transaction set forth in the complaint as the foundation of plaintiff’s claim, nor is it connected with the subject of the action. The transaction set forth is the wrongful taking of the property. While rent due for the use of the premises would have been a complete justification, the fact that it was due did not arise out of the wrongful seizure, nor was it in any way connected with it. It was the result of a breach of the lease, as were all the other items alleged as •elements for defendant’s claim. In Collier v. Ervin, 3 Mont. 142, it was said by this court: “The words in our statute, ‘subject of the action,’ should be construed, not as relating to the thing itself about which the controversy has arisen, but as referring rather to the origin and ground of the plaintiff’s right to recover or. obtain the relief asked.” (See, also, Potter v. Lohse, 31 Mont. 91, 77 Pac. 419, and cases cited.)