
460 So.2d 1232 (1984)
COOSA VALLEY YOUTH SERVICES CORPORATION, a Corporation
v.
ETOWAH COUNTY, et al.
No. 82-956.
Supreme Court of Alabama.
August 31, 1984.
Rehearing Denied November 30, 1984.
*1233 Herbert D. Jones, Jr. of Burnham, Klinefelter, Halsey & Love, Anniston, for appellant.
Michael L. Roberts of Floyd, Keener & Cusimano, Gadsden, for appellees.
EMBRY, Justice.
This appeal is from a trial court's judgment for defendant, Etowah County, in an action filed by Coosa Valley Youth Services Corporation (Coosa Valley).
The creation of Coosa Valley, and other child detention centers licensed by the Department of Youth Services (DYS), was authorized by § 44-3-1, Code 1975. These centers are public corporations. They are the responsibility of a county, or, as in this case, several cooperating, or "member," counties.
The relationships between the member counties and Coosa Valley are defined, in part, by resolutions and policies formally adopted by both. They are further defined by statute. Section 12-15-10, Code 1975, provides that the counties are responsible for paying charges for the lodging of juveniles at the center; section 11-1-10, Code 1975, authorizes and empowers counties to enter contracts with agencies or institutions of the State. Coosa Valley is such an institution. See Carter v. Coosa Valley *1234 Youth Services, 378 So.2d 1145 (Ala.Civ. App.1979).
DYS is empowered by § 44-1-28, Code 1975, to act together with the counties and grant funds to provide and maintain detention facilities. On 8 November 1978, DYS and Coosa Valley entered into a subsidy agreement whereby DYS was to provide funds for the lodging of juveniles under the control and custody of DYS. That contract also provided that Coosa Valley was to give certain "free" days and "reduced rate" days to the counties. A similar contract was executed for the fiscal year 1979-1980. The controversy between Coosa Valley and Etowah County arises from those two contracts and their effect on Etowah County's liability to Coosa Valley.
During the fiscal year 1978-1979, Coosa Valley's assessment for Etowah County was $34,599.29. In its billings for that fiscal year, Coosa Valley did not credit Etowah County with any "free" days or "reduced rate" days. During that year, Etowah County paid Coosa Valley a total of $20,261.19, leaving a balance of $14,338.10 on the amount Coosa Valley contended was due.
In the fiscal year 1979-1980, Coosa Valley's charges to Etowah County were $29,654. During that year the county was not billed for the "free" days or the "reduced rate" days until 17 July 1980, the date the DYS subsidy contract was cancelled. That year, Etowah County paid Coosa Valley $24,898.10, leaving an alleged balance due of $4,755.90.
Coosa Valley sued Etowah County for non-payment on those amounts. Its complaint claims unpaid charges of $14,338.10 for the lodging of juveniles during the fiscal year of 1978-1979. It further claims for unpaid charges of $4,755.90 for the lodging of juveniles during the fiscal year 1979-1980. The trial court entered judgment for the defendant on plaintiff's complaint.
It appears, from the record, that the defendant's counterclaim was not formally adjudicated. Therefore, we deem that claim denied. Hingle v. Gann, 368 So.2d 22 (Ala.1979).
Coosa Valley appealed the trial court's judgment for the defendant.

I
Three issues are presented for this court's review. The first is whether § 12-15-10, Code 1975, imposes liability on Etowah County for the amounts charged by Coosa Valley despite the terms of the contracts entered into between DYS and Coosa Valley. That statute provides as follows:
"All expenses necessary or appropriate to the carrying out of the purposes and intent of this chapter and all expenses of maintenance and care of children that may be incurred by order of the court in carrying out the provisions and intent of this chapter, except costs paid by parents, guardians or trustees, court costs as provided by law and attorney fees shall be valid charges and preferred claims against the county and shall be paid by the county treasurer when itemized and sworn to by the creditor or other persons knowing the facts in the case and approved by the court."
Coosa Valley contends the trial court erred in determining the DYS-Coosa Valley contracts valid and enforceable because the above statute provides that the county is financially responsible for all expenses incurred during the time the juvenile is held in its facility, and does not provide an exception where contractual provisions vary that responsibility. We find that argument untenable.
Coosa Valley chose, for valuable consideration, to enter into written contracts with the Department of Youth Services for the housing of youth. The benefit of those contracts was to run, in part, to Etowah County to relieve it of financial responsibility imposed by § 12-15-10, Code 1975. When read in light of § 44-1-28, which empowers DYS to provide subsidies for youth detention facilities, such as Coosa Valley, it is clear the Legislature intended that the State subsidize these facilities, but that the counties continue to have control *1235 of, and the ultimate financial responsibility for, their operation. The contracts between Coosa Valley and DYS, from which benefits run, in part, to Etowah County, certainly do not deviate from, or conflict, with, the Legislature's intent in that regard. Therefore, we agree with the trial court that these contracts are in harmony with the purposes of the above statute and are enforceable against Coosa Valley.

II
Next, we consider whether the trial court erred by refusing to admit extrinsic evidence regarding the intent of the parties to the DYS-Coosa Valley contracts. Coosa Valley contends that, because the contracts are ambiguous, such evidence should be admissible.
Extrinsic evidence may be admitted to interpret a contract only if the trial judge finds, as a matter of law, that the contract is ambiguous. Wigington v. Hill-Soberg Company, 396 So.2d 97, 98 (Ala. 1981).
Coosa Valley alleges an ambiguity arises from contract clauses which require that Coosa Valley raise local funds from member counties. It argues there is a conflict between those clauses and others which provide for "free and reduced rate" days for the counties. The crux of Coosa Valley's argument is that the effect of giving "free" days to the counties is to reduce the ability of Coosa Valley to raise local funds from member counties. Thus, it contends, an ambiguity exists. We agree with the trial court that Coosa Valley has not proved the contracts in question are ambiguous and hold that court was correct to exclude extrinsic evidence regarding the intent of the parties to the contracts.

III
Last, Coosa Valley contends the trial court's judgment was against the great weight of the evidence. It alleges the evidence established Etowah County was billed only for the amounts it had agreed to pay. The trial court found as follows:
"THE COURT FINDS that youth lodged at Coosa Valley from Etowah County were there either in Pre-Disposition Status or in Post-Commitment Status. Those in Post-Commitment Status had been committed by order of the Juvenile Court to the Custody of the Department of Youth Services of the State of Alabama, and were under the jurisdiction and control of the Department of Youth Services.
"THE COURT FURTHER FINDS that for both years in question Coosa Valley, for valuable consideration, entered into written contracts with the Department of Youth Services for the housing of youth in Post-Commitment Status. The contracts also contained provisions for accepting and housing of youth by Coosa Valley regardless of status at certain reduced daily rates or free days for limited periods of time. The participating counties, including the defendant Etowah County, were third party beneficiaries of said contracts.
"THE COURT FURTHER FINDS that the money claimed by the plaintiff includes daily per diem charges at the regular daily rate for days which the Department of Youth Services contracts provide for free or reduced rates for limited periods, for all youth, regardless of status.
"IT FURTHER APPEARS to the Court after consideration of the briefs of the parties and the applicable law, after consideration of the contracts with the Department of Youth Services, and after consideration of all the evidence offered orally, the Defendants are not indebted to the Plaintiff and that the issues should be found in favor of the Defendants."
When a case is heard by the trial court without a jury, its conclusions will not be disturbed unless they are palpably erroneous or manifestly unjust. Cotton v. McMurtry, 440 So.2d 1039 (Ala. 1983). The record substantiates the factual findings by the trial court. We find that court *1236 correctly concluded, by virtue of the relationships established by the applicable statutes, regulations, policies, and contract documents, that Etowah County was not liable for certain portions of the charges upon which Coosa Valley's suit was based.
Therefore, for the above stated reasons, the trial court's judgment is due to be, and is hereby, affirmed.
AFFIRMED.
TORBERT, C.J., and FAULKNER, ALMON and ADAMS, JJ., concur.
