DOWDELL, J.
The complaint contained Wo counts. The first being a count in trover for the conversion of sis thousand cubic feet of sand; the second, a count in trespass to realty. The suit was brought on the 29th day of April, 1902, and on the 19th of September, 1902, pleas in bar, in short by consent, were filed. On the 12th of February, 1903, at a subsequent term of the court, the defendant was permitted by the court to withdraw its pleas in bar and to file a plea in abatement to the jurisdiction, against the objection of the plaintiffs. ■ Thereupon the plaintiffs moved to strike the plea in abatement on several grounds, of which we need only notice the grounds insisted on, viz.: 1st, that the plea was filed after the lapse of an entire term; 2d, that the plea was filed after pleas to the merits had been filed, and, therefore, on both grounds came too late. The motion being overruled, and to which ruling exception having been reserved, the defendant demuried to the plea. The demurrers being overruled, issue was joined on the plea and a trial was had. Upon a conclusion of the evidence, the same being without conflict'and sustaining the plea, the defendant requested in writing the general charge in its favor on the plea. At this stage of the proceeding, the plaintiffs asked leave of the court to amend their complaint by striking out the count in trespass, which was denied, and plaintiffs excepted. A verdict and judgment resulted in favor of defendant, and from this judgment the plaintiffs prosecute this appeal.
The defendant’s plea in abatement challenged the jurisdiction of the court as to the subject matter of the suit. And, of course, has reference to the subject matter of the second count of the complaint claiming damages for trespass to realty — the lands described being situated in the *437county of Marshall, and, therefore, without the jurisdiction of the circuit court of Madison county —Code, 1896, § 4205. It is not questioned or denied but that the court has jurisdiction of the subject matter of the first count,— the action of trover being personal, and under the section of the Code above quoted, authorized to be instituted either in the county of the defendant’s residence or in the county “in which the act or omission complained of may have been done, or may have occurred.” So we have a complaint containing two counts, in which the court has jurisdiction as to the subject matter of one count, and no jurisdiction as to the subject matter of the other. The plea in abatement went to the quashing of the writ or summons. Section 4205 of the Code of 1896, contains the following provision: “All actions for the recovery of land or of the possession thereof, or for a trespass thereto, must be brought in the county where the land lies; a summons issuing contrary to this section must he abated on the plea of the defendant.” By the terms of the statute, the effect of the plea was to abate the summons. Generally speaking, where a complaint contains two or more counts, setting forth different causes of action, each count is regarded as a separate complaint. Such was the case here. The summons brought the defendant into court to answer the entire complaint and, of course, as much to answer the first count as the second. The court had jurisdiction of the subject matter of the first count and by the summons acquired jurisdiction of the defendant. The plea in abatement should have been limited to the quashing of the summons as to the second count, of which count the court was without jurisdiction.
In the order of pleading, it is an elementary principle that a plea in abatement should be pleaded before a plea in bar, otherwise it is Avaived, and generally should be filed at the earliest opportunity for pleading. Such plea, however, may be allowed Avithin the discretion of the court, after the time for filing the same has passed. Cobb v. Miller, Ripley & Co., 9 Ala. 499; Massey v. Steele’s Admr., 11 Ala. 340; but Avith this limitation upon the discretion of the court in presenting the plea after the time has passed, that it must be confined to cases in *438which, the defendant has not pleaded to the merits, and the plaintiff has not acted upon this waiver of the matter in abatement.—Hawkins v. Armour Packing Co., 105 Ala. 545; Vaughan v. Robinson, 22 Ala. 519; where the doctrine as stated in the cases of Cobb v. Miller, and Massey v. Steele, supra, was reviewed and limited. It must, however, be observed that in the cases above cited, the plea in abatement did not question the jurisdiction of the court as to the subject matter of the suit, but set ap matter that might be waived by the act of the party, except that in the case of Vaughan v. Robinson, supra, which was begun in the justice court, and appealed from that court to the circuit court, the plea in abatement set up a want of jurisdiction in the justice court, because the amount in controversy exceeded the justice’s jurisdiction — no plea to the jurisdiction was filed in the justice court and not until after the case had been appealed to the circuit court, and there had been several trials in that court, and one reversal in'this court, was the plea in abatement filed. It was said by this court in that case: “The defendant had, long before the filing of his plea to the jurisdiction, waived his right to plead it, by pleading the general issue, and proceeding to trial time and again upon it. He cannot be permitted to put the party to a large bill of costs, in a controversy about an issue of his own tendering upon the merits, and thén to abandon that issue and turn him out of court upon the ground that the justice, who sent up the appeal, had no jurisdiction. His admission of record imported by his plea in bar, that he is rightly in court, and upon which he has gained the advantage of trials and continuances, and on which his adversary has acted, incurxfing costs, estops him from denying the jurisdiction of the court in a case like this, where a plea is required to bring the want of jurisdiction to the knowledge of the court.” The case at bar is distinguishable from that case in several respects. Here the suit was commenced in the circuit court and the want of jurisdiction appears from the face of the complaint, the court taking judicial notice of the fact, that the land described bv government numbers and survey is situated in Marshall county. In Vaughan v. *439Robinson, supra, the suit was commenced in the justice court and carried by appeal to the circuit court, and nothing appeared on the face of the pleadings showing a want of jurisdiction in the justice court. Moreover, in that case, though the amount in controversy may have been in excess of the jurisdiction of the justice, the circuit court would have had jurisdiction if the case had originated in that court. So it was more properly speaking, a question of the manner of acquiring jurisdiction than of jurisdiction of the subject matter. Where jurisdiction of the subject matter of the controversy is lacking, and especially where that fact appears upon the face of the complaint, it is never too late to raise the question. Since jurisdiction as to subject matter, may not be conferred even by consent of the parties; the want of it, cannot, therefore, be waived by any act of the party. In either case the judgment of the court would be a nullity. As a general rule, amendments to pleadings should be allowed at any time during the progress of the trial and before the final judgment if no injustice is thereby done. Foster v. Napier, 73 Ala. 595; McBrayer v. Cariker, 64 Ala. 50; Burkham v. Mastin, 54 Ala. 122; Springfield Fire & Marine Ins. Co. v. DeJarnett, 111 Ala. 248.
The plaintiff here before final judgment and during the progress of the trial, offered to amend the complaint-by striking out the second count. This was all in legal effect that could have been been accomplished by a proper plea in abatement and judgment thereon, that is, to the striking down of the summons as to the second count. The amendment should have been allowed and the court erred in disallowing it.
For the errors pointed out, the judgment is reversed and the cause remanded.
Reversed and remanded.