
71 Wis.2d 401 (1976)
288 N.W.2d 509
HICKS, on behalf of himself and all others similarly situated, Respondent,
v.
MILWAUKEE COUNTY, Appellant.
No. 70 (1974).
Supreme Court of Wisconsin.
Submitted on briefs October 2, 1975.
Decided February 19, 1976.
*402 For the appellant there was a brief by Robert P. Russell, corporation counsel, and James J. Bonifas, deputy corporation counsel, both of Milwaukee.
For the respondent there was a brief by Leah M. Lampone and Silverstein, Hausmann & McNally of Milwaukee.
WILKIE, C. J.
Two issues are presented on this appeal. First, does the complaint state a cause of action against the county to recover excessive amounts charged to the plaintiff's account while he was confined in the county jail under the Huber law? The complaint does not state a cause of action in counts 1 and 2 but does in count 3. Second, is there a defect of parties-plaintiff, in that this action may not be maintained as a class action? There is a defect as to parties-plaintiff and we reverse, dismissing the class action.
The complaint alleges three separate causes of action. The first ground of the county's demurrer was a general claim that the complaint did not state a cause of action against it. It is necessary for us to examine each count in the complaint to determine whether a cause of action is stated, because if any count states a cause of action the trial court properly overruled the demurrer on this ground.[1]
*403 Counts 1 and 2 of the complaint do not state a cause of action.
In the first count, it is alleged that the plaintiff was confined in the Milwaukee county jail under the Huber law[2] from June 15, 1970 to September 13, 1970; that during his confinement his account was charged $60 per week; that these charges, which were collected by the county sheriff and transmitted to the treasurer, are in excess of the amounts permitted by law;[3] that the plaintiff filed a claim against Milwaukee county pursuant to statute[4] on behalf of himself and all others similarly situated; and finally that the claim was denied by the county board of supervisors. The first count concludes that as a result of the excessive charges, the plaintiff and the class have been damaged in the amount of $4 million.
The second count realleges the material allegations of the first count and further pleads that the plaintiff and his class received exactly the same accommodations and food as those incarcerated in the county jail for failure to pay city forfeitures but that the per diem rate charged the municipalities of Milwaukee county for housing their prisoners was $2.34 per day, whereas the per diem rate charged to plaintiff and other Huber law prisoners was $9.38 per day, in violation of equal protection.
Neither count states a cause of action against the county. By statute, a Huber law prisoner is liable for "per capita maintenance and cost of his board in the jail as fixed by the county board ..."[5] The sheriff is directed to disperse wages of an employed prisoner by order of the court, according to five priorities. Board *404 and incidental expenses are the first two priorities.[6] The fifth is the balance in the prisoner's account, which is to be paid to him on his discharge.[7] Plaintiff argues that the county is responsible for the failure of the sheriff to disperse the proper amount to a prisoner upon his discharge, on the ground that the sheriff is the agent of the county. This argument is untenable. The sheriff, not the county, is the custodian of a prisoner's account under the Huber law. Moreover, the Wisconsin Constitution expressly prohibits making the county responsible for the acts of the sheriff.[8]
Third count of the complaint does state a cause of action against the county.
The third count realleges the material allegations of the first two counts and adds an allegation that as a result of the excessive and unequal payments required of the plaintiff and his class, the county has been unjustly enriched in the amount of $4 million. This count adequately states a cause of action against the county for money had and received.
In an action for money had and received on a theory of quasi-contract, recovery is allowed where the defendant has received a benefit from the plaintiff and the retention of such benefit by the defendant would be inequitable. The law implies a promise of repayment when no rule of public policy or good morals has been violated. The action is one at law, although governed by equitable principles.[9] The county argues that an action does not lie against it, because the plaintiff's remedy is against the sheriff. Smith v. Barron County[10] lends *405 some support to the county's position. In that case the plaintiff agreed to buy all the outstanding tax certificates of the county, and made a part payment of $200 to the county treasurer. However, the resolution of the county board authorizing the transaction was held beyond its powers. The supreme court rejected the plaintiff's claim for the return of the $200 paid on the ground that because the contract was illegal, the treasurer was not acting as a public officer, and was individually liable. The court held that an action against the county would not lie because under those facts the treasurer was not the agent of the county.
The Smith Case was distinguished in Rice v. Ashland County[11] where the court held an action for money had and received on a theory of quasi-contract lay against the county to recover money paid for invalid deeds, when it was shown that the money had not only been paid into the county treasury but had been expended for county purposes. The focus in unjust enrichment cases is on the benefit received from the plaintiff by the defendant which, in good conscience, should not be retained. That money has merely been retained in the county treasury, rather than expended, has nothing to do with the elements of the cause of action. In fact, there may be circumstances where the money has been expended in such a way that the county has not been unjustly enriched at the expense of the plaintiff. Moreover, except in the case of segregated accounts, there is no way to trace the funds.
Another aspect of the Smith Case is the holding that the county cannot be liable in an action for unjust enrichment unless an agency relationship can be established between the officer receiving payment and the county. We doubt that the sheriff could be held liable in the instant case, for paying over by court order an amount fixed by the county board. However, the relationship between the collector and the municipality in an unjust *406 enrichment case is irrelevant, so long as it can be shown that the funds were paid into the municipal treasury. Accordingly, we hold that the third count of the plaintiff's complaint does state a cause of action and we overrule any holdings in Smith v. Barron County that are to the contrary.
This action not properly brought as a class action.
The county's final argument is that each member of the class has a separate cause of action for money damages, and such actions may not be joined under the class action statute.[12] We have recently answered the same argument in Schlosser v. Allis-Chalmers Corp.[13] If, under the facts of the case, a simplification of the law suit will result and a multiplicity of litigation can be avoided, an action may be maintained on behalf of a class where each member of the class has a separate cause of action for money damages. It is evident that this question will seldom be answered on the face of the complaint, and that demurrer or its equivalent will seldom be an appropriate way to object to a class action. This case is one of the exceptions, because in order for the plaintiff to invoke the rule of the Schlosser Case, he must show that the other members of the class have causes of action against the county. If he does not allege facts showing that other persons have a cause of action against the county, he has not identified a class on whose behalf an action can be maintained.
This is an action on an account[14] where the only relief demandable is the judgment for money. Such actions may not be maintained unless a claim has first been presented to the county board.[15] The complaint alleges that *407 plaintiff filed a claim against the county on behalf of himself and all members of the class. If such a class claim is permissible, all members of the class have a cause of action against the county. If not, plaintiff has failed to define a class, and the demurrer for defect of parties plaintiff should have been sustained.
Every person making a claim against a county must state the nature of the claim and the facts upon which it was founded in writing, and the county board may require that such statements be verified by the affidavit of the claimant, his agent or attorney.[16] The plaintiff claims to represent the class because of his membership in it, not because he is the agent or attorney of every member in the class. He argues that sec. 260.12, the class action statute, governs procedure in claims presented to a county board. Sec. 260.12 is part of title XXV of the statutes, and the scope of title XXV is restricted to civil actions in courts of record.[17] The county board is not a court of record. Therefore, the class action statute can have no application to the procedure in making claims against a county.
Strict compliance with the procedure for asserting claims against a county and instituting actions thereon is required.[18] It is clear that a document presenting multiple claims against a county must at the minimum identify the claimants and show that the claims are being made by their authority. The class claim alleged does not satisfy the statutory procedure. Therefore, the complaint shows on its face that no other member of the purported class has a cause of action against the county and the trial court erred in overruling the demurrer on the grounds of defect of parties-plaintiff.
*408 By the Court.The order is affirmed insofar as it overrules the demurrer to the complaint on grounds of failure to state a cause of action. The order is reversed insofar as it overrules the demurrer to the complaint on grounds of defect of parties-plaintiff, and the demurrer on that ground is sustained, without leave to replead. No costs taxed.
NOTES
[1]  Schweiger v. Loewi & Co., Inc. (1974), 65 Wis. 2d 56, 221 N. W. 2d 882.
[2]  Sec. 56.08, Stats.
[3]  See: Sec. 53.33 and 56.08, Stats.
[4]  Secs. 59.76 and 59.77, Stats.
[5]  Sec. 56.08 (4), Stats.
[6]  Sec. 56.08 (5) (a) and (b), Stats.
[7]  Sec. 56.08 (5) (e), Stats.
[8]  Art. VI, sec. 4, Wis. Constitution; Larson v. Lester (1951), 259 Wis. 440, 49 N. W. 2d 414.
[9]  Arjay Investment Co. v. Kohlmetz (1960), 9 Wis. 2d 535, 101 N. W. 2d 700.
[10]  (1878), 44 Wis. 686.
[11]  (1902), 114 Wis. 130, 89 N. W. 908.
[12]  Sec. 260.12, Stats.
[13]  (1974), 65 Wis. 2d 153, 222 N. W. 2d 156.
[14]  Stringham v. Winnebago County (1869), 24 Wis. 594.
[15]  Sec. 59.76 (1), Stats.
[16]  Sec. 59.77 (1) (a), Stats.
[17]  Sec. 260.01, Stats.
[18]  Raube v. Christenson (1955), 270 Wis. 297, 70 N. W. 2d 639.
