Where the defendant interposes a counterclaim and thereupon demands an affirmative judgment against the plaintiff, the mode of trial of an issue of fact arising thereupon is the same as if it arose in an action brought by the defendant against the plaintiff for the cause of action stated in the counterclaim and demanding the same judgment.
ยง 25-7-104, MCA