This is an appeal from an order made at special term reversing the decision of the clerk of this court to the effect that the defendant is not entitled to the costs of this action, declaring the defendant entitled to such costs, and directing the clerk to adjust them'.
The appeal involves the question which party is entitled to the costs of the action. The complaint is for goods sold and delivered between November -4 and December 30, 1867. The answer “by way of set-off or counter-claim” sets up an agreement as to quality, and to the further effect that all goods thereafter delivered but not coming up to said quality might be returned, and that credit should be allowed to the defendant therefor; that dealings took place between the plaintiffs and defendant during the years 1865, 1866 and 1867 upon the basis of said agreement; that considerable portions of the goods so delivered- under said agreement did not come up to the stipulated quality, and were returned and received back, and credit allowed therefor to the defendant; that among the goods thus purchased were ninety-eight gross of tape, amounting to the sum of three hundred and ninety-two dollars,” which were not of the quality stipulated for, but were, as soon as discovered, returned on or about December 18, 1867, which sum the defendant claimed as a set-off or counter-claim against any sum which the plaintiffs might recover for the goods stated in the complaint.
The plaintiffs, in their reply, deny specifically each and every allegation in the answer, referring to the counter-claim therein set up.
*321It appears sufficiently, from the allegations of the answer, that the ninety-eight gross of tape returned as aforesaid did not constitute any portion of the goods for the recovery of the price of which this action is brought. But whatever doubt might be indulged in upon a superficial perusal of the answer alone, is dispelled by the testimony of the defendant himself, who,' upon his examination, testified that the ninety-eight gross were among a number of deliveries received from about June to October or November, 18"67, that they had been settled for by note, which, became due on December 24, 1867, and was paid at maturity,
The affidavits of George H. Francis and George H. Forster, submitted on the hearing at the special term, also proved distinctly that the ninety-eight gross of tape formed no part of the goods for which the suit was brought. There can, therefore, be no doubt that the defendant’ s claim of three hundred and ninety-two dollars constituted a counter-claim within section 150 of- the Code (Lignot v. Redding, 4 E. D. Smith, 285 ; Halsey v. Carter, 1 Duer, 667; Welch v. Hazleton, 14 How. Pr., 97 ; Gillespie v. Torrance, 25 N. Y., 306).
Counter-claims, under the Code since 1852, embrace both set-offs and recoupments as they were understood prior to that time (Pattison v. Richards, 22 Barb., 146).
A set-off is a money demand by the defendant against the plaintiffs, and refers to" a debt or demand independent of and unconnected with the plaintiffs’ cause of action. It may exceed the plaintiffs’ claim or fall short of it.
Recoupment, however, always implies that the plaintiff had a cause of. action ; the doctrine of recoupment was generally confined to damages for non-performance of the very' contract sued upon (Seymour v. Davis, 2 Sandf., 239,. and Deming v. Kemp, 4 Id., 147), and a balance could not be certified in favor of a defendant before the Code (Sickles v. Pattison, 14 Wend., 257). Since the Code, however, of 1852, it seems that if the defendant’ s demand is sufficient, a defendant may not only de*322feat a plaintiff’s claim by recoupment, but recover a balance, notwithstanding the former rule to the effect that in cases of recoupment, as opposed to set-off, a defendant could only use his claim to defeat that of the plaintiff (Ogden v. Coddington, 2 E. D. Smith, 317).
But while the counter-claim authorized by the Code embraces both set-off and recoupment, it is broader and more comprehensive than either (Vassar v. Livingston, 13 N. Y. [3 Kern.], 256; Beardsley v. Stover, 7 How. Pr., 294). It secures to the defendant the full relief which a separate action at law, or a bill in chancery, or a cross bill would have secured him on the same state of facts (Gleason v. Moen, 2 Duer, 642). ..It may be for either liquidated or unliquidated damages (Schubart v. Harteau, 34 Barb., 447), and for unliquidated damages arising on a contract different from the contract on which the action was brought (Lignot v. Redding, 4 E. D. Smith, 285), and of an equitable or legal nature (Currie v. Cowles, 6 Bosw., 453).
The plaintiffs in this action sued to recover the price of specific quantities of goods sold and delivered within a certain specified period of time.
The counter-claim of the defendant consisted of a money demand against the plaintiffs, wholly independent of and unconnected with the plaintiffs’ cause of action,— namely, of a claim for the value of other goods, which had been returned, although settled for, and taken back by the plaintiffs, and which had nothing whatever to do with the goods for which plaintiffs sued. The claim, therefore, did not, properly speaking, go in reduction of plaintiffs’ claim ; the defendant could not recoup it, but it constituted a set-off within the definitions hereinbefore laid down, for which the defendant might have brought a separate action against the plaintiffs; for the right of the plaintiffs to claim and of the defendant to counterclaim was reciprocal, as has been established by the verdict of the jury.
The jury found in favor of the plaintiffs for the full amount of their claim, four hundred and five dollars and *323seventy-two cents, and in favor of the defendant for the fall amount of the defendant’s set-off, three hundred and ninety-two dollars, and after deducting the same from the amount due the plaintiffs, rendered a verdict for the difference, to wit: thirteen dollars and seventy-two cents in favor of the plaintiffs.
The total amount of the demands and accounts of both parties proved on the trial consequently was seven hundred and ninety-seven dollars and seventy-two cents.
Subdivision 3 of section 304 of the Code provides that costs shall be allowed, of course, to the plaintiff, upon a recovery in the actions of which a court of justice of the peace has no jurisdiction, regardless of the amount of the recovery (Stillwell v. Staples, 5 Duer, 691); and subdivision 4 of section 54 of the Code says that no justice of the peace shall have cognizance of a matter of account where the sum total of the accounts of both parties, proved to the satisfaction of the justice, shall exceeed four hundred dollars. In construing these sections of the Code together, the right of the plaintiffs to recover the costs of the action seems not only clear, but appears to be fully established #by the decisions in Stillwell v. Staples (5 Duer, 691), Crim v. Cronkhite (15 How. Pr., 250), Gilliland v. Campbell (18 Id., 177), and see Glackin v. Zeller (52 Barb., 147). .
The defendant insists, however, that this is otherwise since the passage of chapter 344 of Laws of 1857 (vol 1, p. 708), entitled ‘ ‘ An act to reduce the several acts relating to the district courts in the city of New York into one act,” and claims that as, under the' third section of said act, jurisdiction has been conferred upon said district courts in actions similar to those as provided by sections 53 and 54 of the Code, where the sum recovered shall not exceed two hundred and fifty dollars, notwithstanding the accounts of both parties may exceed four hundred dollars, the district courts of the city of New York had jurisdiction of this action, and for that reason and the further reason that they are courts of the justices of the peace within the meaning of that *324phrase in the Code, he is entitled to costs. It is true . that by the language of the said third section the jurisdiction of the’ district courts is to be ascertained, not as has been the case before, by the amount claimed, but by lithe sum recovered.” It seems the plaintiffs may claim any amount, and if they do not recover more than two hundred and fifty dollars the court has jurisdiction ; but the plaintiffs can in no case recover more than two hundred and fifty dollars.
Section 49 of the same act provides, however, that where the amount found due to either party exceeds the sum for which the justice is authorized to enter judgment, such party may remit the excess, and judgment may be' entered for the residue. Assuming, therefore, that the district courts of the city of Hew York had jurisdiction to try the issues between the parties to this action, the question of costs is to be determined by construing together section 303, subdivision 4 of sections 304 and 305 of the Code ; and in such case neither party is entitled to costs against the other under the decision in Kalt v. Lignot (3 Abb. Pr., 190 ; affirming same case reported in Id., 33, and 12 How. Pr., 535). The decision in the case of Crane v. Holcomb (2 Hilt., 269), relied on by the defendant. as' establishing a contrary doctrine, will be found, on close examination, not to be in conflict with the last cited case, for the reason that the answer in Crane v. Holcomb, in which case the plaintiff sued as indorser and holder of a promissory note made by the defendant, did not set up an independent. demand against the plaintiff, for which the defendant might have maintained a separate action against the. plaintiff, but an equitable defense against the greater part of the plaintiff’s claim,—namely, a counter-claim against the payee, while he was holder of the note,—and then, alleged further that the note came to plaintiff’s possession after maturity, and subject to the defendant’s claim.against it. The case was therefore correctly decided, notwithstanding the decision seems to have been placed upon different grounds. •
*325But the question still to be determined is, whether the district courts of the city of New York are courts of justices of the peace within the meaning of that phrase in the. Code. The defendant has not been able to cite a case in which this point has been decided. Crane v. Holcomb {supra) is no authority on this point; and in Maguire v. Gallagher (2 Sandf., 402) the court expressly declined to base its decision upon this.theory. The district courts referred to were created in 1813 .(2 Rev. Laws of 1813, 370, § 85), and were known until the year 1848 under the style of “ Assistant Justices’ Courts of the city of New York.” By chapter 153 of the Laws of 1848 (p. 249), they were reorganized, and designated as “ Justices’ Courts of the city of New York.” During the same session their name or style was changed to “Assistant Justices’ Courts of the city of New York” {Laws of 1848, 404); and the Code of the same year refers to these courts by the same style {Laws of 1848, 509). In 1849 the style of said courts was again changed to that of “Justices’ Courts in the city of New York,” and in 1852 to “ District Courts in the city of New York” {Laws of 1852, 471, ch. 324). By the act of 1857, hereinbefore referred to, the last named style was retained, and the said courts have been known by that name ever since. It will be found, however, upon an examination of the various statutes of this State passed since 1813, and which are too numerous to be mentioned in detail, that during the whole period of their existence under the aforesaid various names these courts have enjoyed and maintained, before and since the Code, and at all other times, a jurisdiction entirely distinct from that of courts of justices of the peace ; they were organized in a different manner ; they were regulated by special enactments, and treated as a distinct class of city courts of a jurisdiction inferior to that of courts of record, but greater than that possessed by courts of justices of the peace ; provisions of law applicable to the latter were held applicable to the district courts only so far as they were made so by statute ; and the Code itself has maintained *326to the present day a marked and wide distinction between proceedings in, appeals from, and regulations appertaining to said district courts and courts of justices of the peace. The history of legislation on this subject is therefore adverse to the claim set up by the defendant ; and in Mills v. Winslow (2 E. D. Smith, 18), the general term of the court of common pleas expressly decided in broad terms that the said district courts and the marine court of the city of Hew York are not courts of justices of the peace within the meaning of the Code. The cases of Jackson v. Whedon (1 E. D. Smith, 141), and Davis v. Hudson (5 Abb. Pr., 64), tend to establish the same doctrine.
Another important reason why the construction contended for by the defendant cannot be sanctioned, is, that no statute should be so construed as to work injustice. If the plaintiffs had commenced their action for the recovery of the sum of four hundred and five dollars and seventy-two cents claimed by them in a district court, and the defendant had failed to appear, the plaintiffs could have taken judgment only for two hundred and fifty dollars. Their claim would have become merged in the judgment, but the judgment would not have constituted a bar to the claim of three hundred and ninety-two dollars of the defendant, and the defendant could have collected his entire claim in a separate action instituted for that purpose in a court of record.
The order appealed from should be reversed, with ten dollars costs, and the decision of the clerk affirmed.
Barbour, Ch. J., and Fithiau, J.,- concurred.