In an action upon contract when the complaint demands judgment for a sum of money only, if the defendant by the answer does not deny the plaintiff's claim but sets up a counterclaim amounting to less than the plaintiff's claim, the plaintiff, upon filing with the clerk an admission of the counterclaim, may take judgment for the excess, as upon a default for want of an answer.
§ 25-4-602, MCA