Helen Credle (tenant) appeals from the order of dismissal of her appeal pursuant to G. L. c. 239, § 5, for failure to make the required use and occupancy payments. We affirm. The tenant separately appeals from an order entered by a judge in the Housing Court releasing all funds held in escrow to the plaintiff (landlord). The tenant claims that her attorney has a lien, pursuant to G. L. c. 221, § 50, against those funds, and that the lien was impermissibly dissolved when the attorney’s fees awarded the tenant were set off against rent that she owed *637the landlord. See G. L. c. 186, § 14. We vacate the order releasing all the escrowed funds to the landlord.
1. Facts. On May 27, 1994, the landlord commenced a summary process action in the Boston Division of the Housing Court Department, alleging nonpayment of rent. The tenant answered with several defenses and counterclaims, including (1) the landlord’s eviction action was a reprisal in violation of G. L. c. 186, § 18, and G. L. c. 239, § 2A; (2) conditions in the apartment violated the implied warranty of habitability, see Boston Hous. Auth. v. Hemingway, 363 Mass. 184, 199 (1973), and G. L. c. 186, § 14; (3) the landlord’s practices violated G. L. c. 93A; and (4) the landlord’s conduct constituted intentional infliction of emotional distress. On April 26, 1996, after trial, a judge dismissed the intentional infliction claim, found that there had been no retaliation by the landlord against the tenant, and determined that the landlord was due $16,500 in back rent. He also ruled that the conditions in the apartment constituted a breach of the warranty of habitability, the landlord had interfered with the tenant’s quiet enjoyment of the premises in violation of c. 186, § 14, and the landlord had violated c. 93A. The judge, pursuant to Wolfberg v. Hunter, 385 Mass. 390, 400 (1982), entered judgment for the tenant on her claim pursuant to c. 186, § 14, and dismissed the tenant’s implied warranty of habitability and c. 93A claims. The judge awarded the tenant $1,500, plus costs of $97, and attorney’s fees of $6,500, “setoff against the balance due the landlord as calculated pursuant to G. L. c. 239, § 8A.”1 He also awarded her possession of the apartment, contingent on her timely payment to the court of the amount due the landlord ($8,403), *638otherwise judgment on possession would enter automatically for the landlord.
The tenant did not make the required payment and, on May 13, 1996, judgment entered for the landlord. The tenant filed a timely notice of appeal and requested a waiver of the appeal bond, pursuant to G. L. c. 239, § 5. Consistent with G. L. c. 239, § 5, the judge, on May 31, 1996, ordered the waiver, and also ordered the tenant to pay monthly for use and occupancy. The judge explicitly conditioned the tenant’s right to prosecute her appeal on her compliance with this order.
Pursuant to G. L. c. 239, § 5, the tenant appealed from the amount and terms of the appeal bond to a single justice of the Appeals Court. On July 12, 1996, the single justice affirmed the order. The tenant again did not make the required payment and, on August 9, 1996, her appeal was dismissed. The tenant appealed from the dismissal of the appeal and also filed, on August 22, 1996, a separate action in the Housing Court seeking a restraining order to prevent the landlord from levying on the execution. The tenant’s application for a restraining order was denied, the execution was levied, and the tenant vacated the premises.
On November 5, 1996, the landlord moved a judge of the Housing Court to release to it all the funds paid into escrow. The tenant claimed that her attorney had a lien on the funds pursuant to G. L. c. 221, § 50. On December 10, 1996, a judge of the Housing Court concluded that the tenant’s attorney had a lien on the escrowed money that superseded any claim by the landlord, and ordered the release of $6,500 to the tenant’s attorney, with any remainder to be paid to the landlord. The landlord moved for reconsideration, and, on January 3, 1997, the judge reversed himself because he was “honor bound to carry out the dictates of [the trial judge] in this matter.” The judge explained that “the attorney’s fees were already utilized by [the trial judge] to offset the landlord’s claim for rent. . . . If [the trial judge] had not offset the attorney’s fees against the balance owed, [the tenant’s attorney] would be entitled to his lien. But since the amount of $6,500.00 was utilized to offset the amount owed the plaintiff, there is no money against which there is a lien.” Accordingly, the judge ordered the release of all the escrowed funds to the landlord. The tenant appealed and the release of the money was stayed pending appeal. We transferred the case from the Appeals Court on our own motion.
*6392. Dismissal of the tenant’s appeal on the issues of possession and the tenant’s counterclaims. The tenant assigns error on the dismissal of all her claims and counterclaims on appeal. We conclude that the dismissal of the tenant’s claims to possession, as well as her counterclaims, was correct. The dismissal of those claims and counterclaims was not inconsistent with G. L. c. 239, § 5.
General Laws c. 239, § 5, provides in pertinent part: “[T]he defendant shall, before any appeal under this section is allowed from a judgment . . . rendered for the plaintiff for the possession of the land or tenements demanded in a case in which the plaintiff continues at the time of establishment of bond to seek to recover possession, give bond in such sum as the court orders .... If the defendant fails to file with the clerk of the court rendering the judgment, the amount of the bond . . . required . . . the appeal from the judgment shall be dismissed” (emphasis supplied). Here, it is undisputed that the tenant remained in possession, and the landlord sought to recover possession, into August, 1996, well after bond was established. The statute requires that the bond be filed, and, absent such filing, that the appeal be dismissed.
Principles of judicial economy require that the tenant’s appeals not be severed. Defenses and compulsory counterclaims are part and parcel of the underlying case and are adjudicated as part of that case. See Mass. R. Civ. P. 8 (c), 365 Mass. 749 (1974); Mass. R. Civ. P. 13 (a), as amended, 423 Mass. 1405 (1996). Similarly, once a defendant has raised permissive counterclaims in response to the plaintiff’s action, these claims also become part of the underlying case. See Mass. R. Civ. P. 13 (b), 365 Mass. 758 (1974). The tenant cannot complain when her claims are lost for her failure to comply with orders of the court. See Gos v. Brownstein, 403 Mass. 252, 255 (1988).
3. Setoff of attorney’s fees. The tenant separately appealed from the order releasing to the landlord all the funds held in escrow.2 The tenant claims that her attorney has a lien, pursuant to G. L. 221, § 50, against those funds. She contends that the lien prevents the judge from setting off the attorney’s fees awarded to her on her counterclaim pursuant to G. L. c. 186 against the rent owed. We agree.
General Laws c. 221, § 50, provides in pertinent part: “From *640the authorized commencement of an action, counterclaim or other proceeding in any court. . . the attorney who appears for a client in such proceeding shall have a lien for his reasonable fees and expenses upon his Ghent’s cause of action, counterclaim or claim, upon the judgment, decree or other order in his client’s favor entered or made in such proceeding, and upon the proceeds derived therefrom.” The relevant provision of G. L. c. 186, § 14, states: “Any person who commits any act in violation of this section shall also be liable for actual and consequential damages . . . and the. costs of the action, including a reasonable attorney’s fee, all of which may be applied in setoff to or in recoupment against any claim for rent owed or owing.”
Thus, pursuant to G. L. c. 221, § 50, an inchoate lien in favor of the tenant’s attorney arose upon the filing of the tenant’s counterclaim and matured upon entry of judgment for the tenant. See Torphy v. Reder, 357 Mass. 153, 155-156 (1970). That the landlord was awarded a larger amount on its claim does not change the character of the judgment for the tenant. See Cohen v. Lindsey, 38 Mass. App. Ct. 1, 5 (1995). The lien attached to the tenant’s award. Boswell v. Zephyr Lines, Inc., 414 Mass. 241, 244 (1993). Moreover, because the attorney’s lien arose prior to the judgment for the landlord, it has priority under the principle of first in time, first in right. See Murphy v. Brilliant Co., 323 Mass. 526, 532 (1948). Accord Continental Cas. Co. v. Kelly, 106 F.2d 841, 843 (D.C. Cir. 1939); Cetenko v. United Cal. Bank, 30 Cal. 3d 528, 534 (1982).
Enforcing an attorney’s hen serves two policy interests. First, it “protects attorneys . . . ‘by disabling the clients from receiving the fruits of recoveries without paying for the valuable services by which the recoveries were obtained.’ ” Boswell, supra at 248, quoting Matter of Heinsheimer, 214 N.Y. 361, 364 (1915). Second, and more importantly, by ensuring that lawyers will be compensated for their services, the lien provides access to legal services to clients with colorable claims who otherwise could not afford legal services. See Cetenko, supra at 536.
We construe statutes to give reasonable effect to all the statutory provisions and create a consistent body of law. See Boswell, supra at 247; Boston v. Board of Educ., 392 Mass. 788, 793 (1984). Because the attorney’s lien under c. 221, § 50, takes effect on commencement of the suit and has priority over any later accruing right of setoff under c. 186, § 14, any attorney’s fees awarded a tenant may not be set off against a judgment for *641the landlord. This does not, however, vitiate the setoff provision of c. 186, § 14, because the setoff may be applied to any portion of the award in favor of the landlord over and above any sum to which an attorney’s lien has attached.
Our conclusion is consistent with G. L. c. 235, § 27, which prohibits the setoff of executions “[a]s to the portion of . . . [an] execution upon which [an] attorney has a lien under [c. 221, § 50].” See Murphy, supra at 532. It is also consistent with the fee-shifting provision in c. 186, § 14, that seeks to encourage the private enforcement of particular laws chosen by the Legislature. See Lincoln St. Realty Co. v. Green, 374 Mass. 630, 632 (1978).
Permitting a setoff where an indigent tenant owes a landlord more than the landlord owes the tenant, would be contrary to these goals. If the setoff were permitted, because the tenant is unlikely to have other funds with which to pay her attorney, the tenant’s attorney, rather than the landlord, would bear the expense of the litigation. This would discourage attorneys from taking such cases.
4. Tenant’s request for appellate attorney’s fees. Relying on Yorke Mgt. v. Castro, 406 Mass. 17 (1989), the tenant asks for costs and attorney’s fees related to these appeals. Because the tenant does not prevail on the appeal from the dismissal of her appeal she is not entitled to appellate attorney’s fees. See Yorke Mgt., supra at 20. As to the appeal from the order releasing all the escrowed funds to the landlord, there is no basis to depart from the traditional American rule that the prevailing party is not entitled to attorney’s fees. See Yorke Mgt., supra at 18-19.
5. Conclusion. The tenant’s appeal from the dismissal of her appeal for failure to make the use and occupation payments is dismissed. The order of the Housing Court awarding all the funds in escrow to the landlord is vacated. The case is remanded to the Housing Court where an order shall enter directing that $6,500 of the escrowed funds be paid to the tenant’s attorney, and the remainder, if any, be paid to the landlord.
So ordered.
General Laws c. 239, § 8A, provides in pertinent part: “There shall be no recovery of possession under this chapter if the amount found by the court to be due the landlord equals or is less that the amount found to be due the tenant or occupant by reason of any counterclaim or defense under this section. If the amount found to be due the landlord exceeds the amount found to be due the tenant or occupant, there shall be no recovery of possession if the tenant or occupant, within one week after having received written notice from the court of the balance due, pays to the clerk the balance due the landlord, together with interest and costs of suit, less any credit due the tenant or occupant for funds abeady paid by him to the clerk under this section. In such event, no judgment shall enter until after the expiration of the time for such payment and the tenant has failed to make such payment. Any such payment received by the clerk shall be held by him subject to the provisions of the preceding paragraph.”
The tenant’s appeal from the order releasing the escrowed funds was not affected by the dismissal of her appeal under G. L. c. 239, § 5.