25-31-907. Judgment when counterclaim has been established. Where a counterclaim is established which equals the plaintiff's demand, the judgment must be in favor of the defendant. Where it is less than the plaintiff's demand, the plaintiff must have judgment for the residue only. Where it exceeds the plaintiff's demand, the defendant must have judgment for the excess.