Plaintiff (Donegal) filed an action in Replevin to recover two automobiles, a Buick and a Chevrolet, in defendants’ possession to which it claimed title and the legal right to immediate possession. The prior owners of both automobiles had been insured by plaintiff which paid claims to said owners for damages to the vehicles caused by the Johnstown flood of 1977. Thereafter, a new certificate of title had been issued to plaintiff for one of the vehicles and a Certificate of Junk for the other. The defendants had secured possession of the vehicles from George Rigo, who had towed the cars from the Johnstown area to his automobile salvage yard in Stoystown. Defendant Miller saw the cars there, and arranged to purchase them from Rigo, who told Miller that he did not have title to the cars yet, but that he eventually would. Defendant Miller paid Rigo $1,000 for the Buick and $500 for the Chevrolet. The Buick is stored at the residence of Miller’s mother, the co-defendant herein, and the Chevrolet is at Miller’s residence in Pittsburgh.
Representatives of the plaintiff visited Rigo’s salvage yard in search of missing vehicles, but the two cars were not on Rigo’s list. Defendant-Miller made substantial repairs to the two vehicles,1 and thereafter discovered that the plaintiff, in fact, had title to the cars. Miller then contacted the company and attempted to purchase the vehicles. The plaintiff refused and demanded possession. Miller refused to return the cars arguing that he should be compensated for the repairs which he made.
Following the filing of a complaint in replevin by plaintiff, the defendants filed an answer in which they alleged that the vehicles had been abandoned by plaintiff after they had been recovered from the flood area. Under a new matter, they alleged further that they were the owners of *189same by reason of a purchase, from George Rigo, trading as George Rigo Auto Wrecking, made in good faith and for a consideration.
In addition to alleging ownership of the automobiles, by way of counterclaim, appellants also claimed $5253.20 for work and materials in restoring them to operable condition. They alleged that plaintiff knew this work was being done and took no steps to recover the vehicles or to prevent appellants from repairing them. They argue that under these circumstances, plaintiff should not be unjustly enriched by receiving the benefits of this work. Plaintiff denied the allegations of the counterclaim.
The matter proceeded before arbitrators on these pleadings and resulted in an award of possession of the two automobiles to plaintiff, and an award of $2000.00 to the defendants on the counterclaim. Plaintiff appealed and the case was listed for trial in Common Pleas Court in September 1978. However, on August 24, 1978, prior to trial, the court granted plaintiff’s motion for judgment on the pleadings regarding the counterclaim. The defendants immediately appealed to this court (481). The case then proceeded to trial on November 20, 1978 on the sole issue of the ownership of the automobiles. Judgment was entered in plaintiff’s favor and defendants again appealed (609).
Defendants’ first argument relates to the motion for judgment on the counterclaim which they argue should not have been granted since the case was on appeal from arbitration and listed for trial which was delayed because of the motion for judgment; and further, because no objection to the counterclaim had been made by preliminary objection, answer or reply as required by Pa.R.C.P. 1032.
It appears that appellants are not pressing the appeal at 609 which was from the judgment in plaintiff’s favor for possession of the automobiles and for that reason it will be dismissed.2 We shall, therefore, consider it abandoned and *190address ourselves only to the question relating to the counterclaim.
To sustain the counterclaim of the defendants, we would be compelled to ignore the clear meaning of Pa.R.C.P. 1082 which provides that in an action of replevin
“(a) A claim secured by a lien on the property may be set forth as a counterclaim. No other counterclaim may be asserted.” (underlining supplied for emphasis).
We are not inclined to violate this mandate. The defendant asserts no lien on these vehicles but rather alleges what amounts to a quantum merit claim or one of estoppel. Neither are permitted by the rule. Defendants also question the right of plaintiff-appellee to seek a summary judgment because of the delay in filing its motion, same not having been filed shortly before trial and after pre-trial. They argue this objection was waived under Rule 1032. We do not accept this argument.
Rule 1035 provides that summary judgment on the pleadings, etc., may be granted after the pleadings are closed but within such time as not to delay trial.
We find no waiver under Rule 1032 since the defense of failure to state a claim upon which relief can be granted is an exception to that rule and may be raised by a later pleading or by a motion for judgment on the proceedings. Thus, we have a non-waivable defense.
This case was first listed for trial in September of 1978. Prior thereto at a pretrial conference, Judge Shaulis, who was conducting same, inquired as to a possible motion for judgment on the pleadings regarding the counterclaim. Thereafter on August 24, 1978, such a motion was filed, and by an order dated August 29, 1978, Judge Coffroth, P. J., continued the case from the August term3 to the October term to enable Judge Shaulis to dispose of the motion for judgment on the pleadings. The argument on the motion was Jield October 13, 1978, and the motion disposed of *191November 1, 1978. The replevin case was tried non-jury before Judge Coffroth on November 20, 1978, and his decision rendered December 7, 1978 in plaintiff’s favor. Why it was tried non-jury is not clear since by order of November 1, 1978, defendants’ motion of a jury trial, which had been filed September 26, 1978, had been granted.
Rule 1035 provides that a motion for summary judgment may be filed within such time as not to delay trial, and we cannot say that plaintiff’s motion was filed at such a time as to delay the trial. It was filed August 24, 1978, in sufficient time to have been disposed of before the trial date. It was the court’s own action, without request, to set a new trial date in order to dispose of this motion. Whether this was due to the court’s schedule or a desire to have the motion disposed of by a court en banc, rather than the pre-trial judges or the trial judge, we cannot say. Under Rule 1032, such a motion may be considered at trial if the failure to state a cause of action is disclosed. Also, the apparent dispute between the parties, as to a jury or non-jury, and the defendants’ motion filed September 7, 1978, to strike plaintiff’s motion for summary judgment are other factors to be considered as a cause for some delay.
Regardless, in the light of this motion being based on a claim that could not sustain a verdict or decision in defendants’ favor after trial, and for a reason that could not be waived, we are constrained to hold that it was timely filed. Goodrich-Amran 2d Sect. 1032: 5, Vol. 2 pp. 337, 338 is in accord:
Rule 1032 sets up four defenses or objections which are unaffected by the pleading stage of the action. They may be raised in the pleading stage, if not, there is no waiver, and they may be raised later in the action, even as late as the trial on the merits.
The first and third of these exceptions are described as ‘failure to state a claim upon which relief can be granted’ and ‘failure to state a legal defense to a claim’ this is a restatement of the basic principles that a claim without legal merit can not sustain a verdict or judgment . *192the pleadings become irrelevant on this issue. Whether the claim or defense is valid is a matter of law for the court, not a matter of pleading technique for the parties. The same rule applies to the answer, including its new matter, and to the counterclaim, the reply and the counter reply. As to all these pleadings, their legal sufficiency as a statement of an affirmative position or as a statement of a defensive position can be attacked, at the option of the opponent, at various times, or in the various manners specified in Rule 1032(1).
The summary judgment in plaintiff-appellee’s favor on appellants’ counterclaim at 481 April Term 1979 is affirmed and the appellants’ appeal at 609 April Term 1979 is hereby dismissed.
. It was alleged by Rigo that the vehicles were “covered and saturated with mud, severely damaged, had parts and equipment missing, were not in operating condition and had only scrap value.”
. A motion to quash this appeal (609) was filed by plaintiff-appellee and denied. Thereafter, a petition for Allowance of Appeal was filed with the Supreme Court and denied on December 21, 1980.
. Probably an error since the case was listed for the September session, not August.