
590 N.W.2d 360 (1999)
256 Neb. 432
Stephen P. BECKER, Appellee,
v.
James HOBBS, Appellant.
No. S-97-1366.
Supreme Court of Nebraska.
March 12, 1999.
*362 Lance D. Ehmcke and Patrick L. Sealey, of Heidman, Redmond, Fredregill, Patterson, Plaza & Dykstra, L.L.P., Sioux City, for appellant.
C.J. Gatz and Ronald E. Temple, of Gatz & Fitzgerald, and John M. Thor, Norfolk, for appellee.
HENDRY, C.J., WRIGHT, CONNOLLY, GERRARD, STEPHAN, McCORMACK, and MILLER-LERMAN, JJ.
CONNOLLY, J.
This appeal presents the question, May a party assert a counterclaim in which the applicable statute of limitations had run on the counterclaim at some point between the date that the plaintiff's petition was filed and the date that the counterclaim was filed? In this appeal, appellee Stephen P. Becker filed a negligence suit against appellant James Hobbs. Hobbs filed a timely answer which included a counterclaim asserting a negligence claim against Becker. The district court determined that Hobbs could not assert the counterclaim because the statute of limitations had run prior to the date Hobbs filed the counterclaim, even though the statute of limitations had not yet run on the date Becker filed his petition. We reverse, concluding that the limitation statutes in Neb .Rev.Stat. ch. 25, art. 2 (Reissue 1989 & Cum.Supp.1992) do not bar a counterclaim so long as the counterclaim would not have been barred on the date the plaintiff's petition was filed and thus, that Hobbs may assert his counterclaim.

BACKGROUND
On November 28, 1992, motor vehicles driven by Becker and Hobbs collided on a county road south of Pilger, Nebraska. Both Becker and Hobbs suffered injuries from the collision.
On October 24, 1996, Becker filed this lawsuit against Hobbs, alleging that Hobbs operated his vehicle negligently and that his negligence proximately caused Becker damage. Becker prayed for general damages, special damages totaling $20,997.08, and future special damages then unascertainable. Hobbs was personally served with process on November 27.
On December 23, 1996, Hobbs filed an answer. Within the answer, Hobbs asserted affirmative defenses of contributory negligence and failure to mitigate damages, and also asserted a counterclaim against Becker. Hobbs' counterclaim alleged that in the same 1992 collision Becker was negligent and that his negligence proximately caused Hobbs damage. Hobbs prayed for general damages "which shall fairly and fully compensate the Counter claimant for the general damages and injuries sustained by him," special damages totaling $17,564.62, and future special damages then unascertainable.
Becker demurred to Hobbs' counterclaim, on the ground that the applicable statute of limitations had run prior to the date that Hobbs filed the counterclaim. See § 25-207. Hobbs resisted the demurrer, on the ground that his counterclaim arose out of the same occurrence as Becker's suit and thus related back to the date Becker filed his petition. Alternatively, Hobbs argued that his counterclaim did not seek an affirmative judgment but, rather, only sought recoupment against Becker's suit.
*363 The district court sustained Becker's demurrer with leave to amend. The court stated that our decision in Ed Miller & Sons, Inc. v. Earl, 243 Neb. 708, 502 N.W.2d 444 (1993), was dispositive of the issue. Once determining that Hobbs' counterclaim was a claim for affirmative relief, rather than a defense of recoupment, the court stated that Ed Miller & Sons, Inc. directed the result that the statute of limitations applied to, and continued to run against, the counterclaim. Thus, the court concluded that Hobbs' counterclaim was barred because it was filed more than 4 years after the cause of action arose.
After being given leave to amend, Hobbs filed an amended answer which asserted the same denials and affirmative defenses, but altered his previously asserted counterclaim. As amended, Hobbs again alleged under a section he entitled "Counterclaim" that Becker was negligent and that his negligence proximately caused Hobbs damage in the 1992 collision. After alleging over $17,500 in various damages Hobbs suffered from the collision, Hobbs stated: "HOBBS is entitled to recoup and recover from BECKER the amounts and damages set forth ... and also to have them operate as a set-off against the claims made by BECKER in the petition in this action." Hobbs prayed "for judgment against ... Becker, to recoup and recover from ... Becker, all of the amounts set forth in ... this counterclaim; and further to have those amounts operate as a set-off against any recovery while [Becker] may be awarded for the matters alleged in the petition in this action...." Becker moved for summary judgment on Hobbs' counterclaim. Both parties advanced legal arguments to the court similar to those they had made in the hearing on the demurrer.
The court granted Becker summary judgment. The court stated in its order that the amended answer, while it requested the court to limit the relief to any judgment Becker was awarded, nonetheless still sought an affirmative judgment, and thus was not substantively a defensive pleading or demand for recoupment. Based on that finding and its analysis from its order sustaining Becker's earlier demurrer, the court granted Becker summary judgment and dismissed Hobbs' counterclaim. Hobbs appeals.

ASSIGNMENTS OF ERROR
Hobbs assigns that the district court erred in finding (1) that Becker's petition did not toll or suspend the running of the statute of limitations on Hobbs' counterclaim, (2) that Hobbs' counterclaim only sought affirmative relief, and (3) that Hobbs could not maintain his counterclaim under a theory of recoupment.

STANDARD OF REVIEW
A challenge that a pleading is barred by the statute of limitations is a challenge that the pleading fails to allege sufficient facts to constitute a cause of action. See, LaPan v. Myers, 241 Neb. 790, 491 N.W.2d 46 (1992); Olsen v. Richards, 232 Neb. 298, 440 N.W.2d 463 (1989). When it has been asserted in a summary judgment motion that an opposing party has failed to state a cause of action, as far as that issue is concerned, the motion may be treated as one in fact for a judgment on the pleadings, notwithstanding its designation as something other than that. Ruwe v. Farmers Mut. United Ins. Co., 238 Neb. 67, 469 N.W.2d 129 (1991). A motion for judgment on the pleadings admits the truth of all well-pleaded facts in the opposing party's pleadings, together with all reasonable inferences to be drawn therefrom, and the moving party admits, for the purpose of the motion, the untruth of the movant's allegations insofar as they have been controverted. Hutmacher v. City of Mead, 230 Neb. 78, 430 N.W.2d 276 (1988).

ANALYSIS
At the outset, we note that the proper procedure by which to challenge a counterclaim is a motion to strike. Barks v. Cosgriff Co., 247 Neb. 660, 529 N.W.2d 749 (1995); Weller v. Putnam, 184 Neb. 692, 171 N.W.2d 767 (1969). However, Hobbs has waived his right to assign this procedural error because he has not objected to it.
Hobbs argues, first, that his amended, operative answer asserts a counterclaim. He then argues that either (1) Becker's petition *364 tolled the statute of limitations against the counterclaim, asserting that our case law, including Davis Erection Co. v. Jorgensen, 248 Neb. 297, 534 N.W.2d 746 (1995), directs such a result, or (2) the applicable statute of limitations, § 25-207, does not apply to counterclaims. Hobbs alternatively contends that his "counterclaim" effectively asserts the defense of recoupment and is not subject to any statute of limitations. Becker asserts that Hobbs' "counterclaim" requests affirmative relief and thus cannot be construed as anything but a counterclaim. He then claims that Hobbs' counterclaim is barred because of § 25-207, which states that a personal injury action can only be brought within 4 years of the injury, and because of our decision in Ed Miller & Sons, Inc. v. Earl, 243 Neb. 708, 502 N.W.2d 444 (1993). In Ed Miller & Sons, Inc., we stated that a counterclaim is barred by a statute of limitations unless the counterclaim is filed within the applicable statutory period for commencement of an action.
Initially, we must determine the question of whether Hobbs' operative answer on appeal pleads a counterclaim or a recoupment defense. If the answer pleads recoupment, then Hobbs prevails, because the defense of recoupment "survives as long as plaintiff's cause of action exists, even if affirmative legal action upon the subject of recoupment is barred by the statute of limitations." Nathan v. McKernan, 170 Neb. 1, 16, 101 N.W.2d 756, 766 (1960). Although a pleading should not leave uncertainty as to the theory on which the pleader wishes to proceed, we have held that in actions not involving extraordinary remedies, general pleadings are to be liberally construed in favor of the pleader. See, Fitzpatrick v. U.S. West, Inc., 246 Neb. 225, 518 N.W.2d 107 (1994); Hutmacher v. City of Mead, supra. It is the facts well pleaded, not the theory of recovery or legal conclusions, which state a cause of action. McCurry v. School Dist. of Valley, 242 Neb. 504, 496 N.W.2d 433 (1993).
A counterclaim in this jurisdiction " `must be an existing, valid, and enforceable cause of action in favor of the defendant against the plaintiff.' " McGerr v. Marsh, 148 Neb. 50, 58, 26 N.W.2d 374, 378 (1947). It "must be one in favor of a defendant and against a plaintiff between whom a several judgment might be had...." Neb.Rev.Stat. § 25-813 (Reissue 1995). On the other hand, recoupment can only be used defensively. See In re Estate of Massie, 218 Neb. 103, 353 N.W.2d 735 (1984), overruled on other grounds, In re Estate of Price, 223 Neb. 12, 388 N.W.2d 72 (1986). In summary, "there is a difference between recoupment and a counterclaim. The former is purely defensive, while the latter seeks to recover an affirmative judgment." Katskee v. Nevada Bob's Golf of Neb., 238 Neb. 654, 659, 472 N.W.2d 372, 377 (1991).
Hobbs' answer pleads the necessary facts to assert an independent negligence action, it seeks damages independent of those demanded by Becker, and although it contains some language to the contrary, it seeks an independent judgment for all damages Hobbs alleged he incurred. Thus, we conclude Hobbs' answer asserts a counterclaim.
The issue then is whether Hobbs' counterclaim is barred by the statute of limitations, when the applicable statute of limitations had not yet run on the date Becker's petition was filed, but had run at some point before the date Hobbs' counterclaim was filed. This is the first time this court has been presented with this precise issue.
In Davis Erection Co. v. Jorgensen, 248 Neb. 297, 306, 534 N.W.2d 746, 751 (1995), we stated:
A counterclaim, setoff, or cross-petition, to be available as a matter of affirmative defense or affirmative relief, must be a claim upon which the defendant could, at the date of the commencement of the plaintiff's suit, have maintained an action on the defendant's part against the plaintiff.
See, Weller v. Putnam, 184 Neb. 692, 171 N.W.2d 767 (1969); Simpson v. Jennings, 15 Neb. 671, 675, 19 N.W. 473, 475 (1884) (stating that "a claim on the part of a defendant... against the claim of a plaintiff against him must be one upon which he could, at the date of the commencement of the suit, have *365 maintained an action on his part against the plaintiff"). This rule is consistent with the statutory requirement that a "counterclaim... must be one in favor of a defendant and against a plaintiff between whom a several judgment might be had in the action...." § 25-813.
Hobbs asserts that once a counterclaim meets the requirement that it would not have been time barred on the date the plaintiff's petition was filed, that determination is conclusive of the issue, and the counterclaim may be pursued. While Hobbs' interpretation would be consistent with Davis Erection Co. and Weller, those cases did not present the same factual circumstances, nor did they address the precise issue before us. In the instant case, the facts present a counterclaim that was enforceable as an independent action on the date the plaintiff's petition was filed but not independently enforceable on the date the counterclaim was filed. Thus, Davis Erection Co. and Weller are not controlling on the issue before us, and we must determine if the law provides any additional statute of limitations requirements for counterclaims.
Section 25-207, the applicable statute of limitations to both negligence claims in the instant case, reads in pertinent part: "The following actions can only be brought within four years: ... (3) an action for an injury to the rights of the plaintiff, not arising on contract, and not hereinafter enumerated." (Emphasis supplied.) A counterclaim in this jurisdiction must by definition be an enforceable cause of action in favor of the defendant. See McGerr v. Marsh, 148 Neb. 50, 26 N.W.2d 374 (1947). Therefore, a reading of § 25-207 suggests that a counterclaim, as an action, be considered separately from the action within the plaintiff's petition when applying the statute of limitations.
However, a reading of related statutes in conjunction with § 25-207 suggests that a counterclaim not be considered separately from the related petition. Section 25-201 states: "Civil actions can only be commenced within the time prescribed in this chapter, after the cause of action shall have accrued." Section 25-217 reads in part: "An action is commenced on the date the petition is filed with the court." (Emphasis supplied.)
Statutes relating to the same subject matter will be construed so as to maintain a sensible and consistent scheme and so that effect is given to every provision. State ex rel. City of Elkhorn v. Haney, 252 Neb. 788, 566 N.W.2d 771 (1997). Section 25-217 states that actions are commenced, or "brought," to use the applicable word in § 25-207, on the date the petition is filed. To conclude that an action commences on a date other than that on which the petition is filed would render § 25-217 superfluous. For purposes of the limitation statutes found within chapter 25, article 2, a counterclaim, as an action, is therefore commenced on the date the plaintiff's petition is filed. It follows then that whether a counterclaim is barred by the applicable statute of limitations is determined by the date the plaintiff's petition was filed, rather than the date the counterclaim was filed.
Becker argues that our conclusion here is contradictory to our decision in Ed Miller & Sons, Inc. v. Earl, 243 Neb. 708, 502 N.W.2d 444 (1993). In Ed Miller & Sons, Inc., the plaintiff sued upon a written lease contract for unpaid rent and repairs, on which the statute of limitations had not yet run. The defendant pleaded fraud both as a defense of recoupment and as a counterclaim in two separate areas of his pleading. In determining that the defendant's counterclaim in Ed Miller & Sons, Inc. was barred by the applicable statute of limitations, we stated: "A counterclaim, seeking an affirmative judgment or relief, is barred by a statute of limitations unless the counterclaim is filed within the applicable statutory period for commencement of an action." Id. at 718-19, 502 N.W.2d at 452. In Ed Miller & Sons, Inc., unlike the instant case, the applicable statute of limitations had run on the counterclaim prior to the date that the plaintiff filed its petition. In fact, the statute of limitations on the counterclaim in Ed Miller & Sons, Inc. had run more than a year before the plaintiff filed its petition. See, § 25-207; Ed Miller & Sons, Inc., supra (plaintiff filed petition in December 1989 and defendant discovered evidence in January 1984 that *366 indicated that alleged statement by plaintiff was misrepresentation). Thus, the defendant's counterclaim in Ed Miller & Sons, Inc. did not meet the requirement that the counterclaim be a viable action on the date that the plaintiff's petition is filed and our conclusion is not contradictory to the facts in Ed Miller & Sons, Inc.
Moreover, policy and fundamental fairness also support a rule providing that the date the plaintiff's petition is filed determines whether a counterclaim is time barred. A statute of limitations provides a period of repose designed, if asserted, to prevent recovery on stale claims. Hullinger v. Board of Regents, 249 Neb. 868, 546 N.W.2d 779 (1996).
The main purpose of a statute of limitations is to notify the defendant of a complaint against him or her within a reasonable amount of time so that the defendant is not prejudiced by having an action filed against him or her long after the time he or she could have had to prepare a defense against a claim.
Id. at 873, 546 N.W.2d at 784. Hobbs' claim, arising from the same facts and the same theory of recovery as Becker's claim, is no more stale than Becker's claim. Becker cannot claim prejudice by unfair surprise or an inability to prepare a defense to Hobbs' claim. Indeed, a counterclaim in this state must always arise from the same contract, transaction, or subject matter as the plaintiff's action, see § 25-813, and be an enforceable cause of action when the plaintiff's petition is filed, see Davis Erection Co. v. Jorgensen, 248 Neb. 297, 534 N.W.2d 746 (1995). We do not perceive how a plaintiff can be prejudiced by having a counterclaim filed against him or her that became unenforceable as an independent cause of action only after his or her petition was filed.
On the other hand, a rule that a statute of limitations continues to run against a counterclaim until it is actually filed would encourage great mischief. A plaintiff with a relatively weak claim, knowing that the defendant has a claim that could more than defeat the plaintiff's claim, could wait until the eleventh hour to file a petition and wait beyond the statute of limitations to serve process on the defendant, precluding any possibility of the defendant's being able to counter the plaintiff's action. The purpose of a statute of limitations is to prevent recovery of stale claims. The purpose "is not intended to bar nor smother any mere defense of a party so as to compel him to stand dumb and mute while his antagonist bludgeons his head with every weapon in the book of legal, offensive warfare." (Emphasis omitted.) Liter v. Hoagland, 305 Ky. 329, 332, 204 S.W.2d 219, 220 (1947).
Hobbs' counterclaim would not have been barred by the applicable statute of limitations, § 25-207, had he asserted it as an independent cause of action on the date Becker's petition was filed. Thus, Hobbs' counterclaim is not barred by the statute of limitations. With this conclusion, we need not consider Hobbs' other assigned errors.

CONCLUSION
The limitation statutes within chapter 25, article 2, require only that a counterclaim be an enforceable cause of action on the date the relevant plaintiff's petition is filed. Hobbs' counterclaim is not barred by the statute of limitations, as it would not have been barred had it been asserted as an independent cause of action on the date Becker's petition was filed. We therefore reverse the district court's grant of summary judgment to Becker.
REVERSED.
