Most of California's counties have joined forces in a lawsuit to force the state legislature to pay the increased costs of enforcing nearly two dozen state laws, including stringent new drunk-driving legislation.

Although a spokesman for the county governments said they support the new mandatory court penalties for drunk driving, that law might be declared unconstitutional if the counties win their case in Sacramento County Superior Court.

The suit against the state, filed Monday by 38 of California's 58 counties, seeks a judicial endorsement of their argument that the state constitution requires adequate funding for new laws.

State and federal highway-safety officials credited widespread publicity about the new drunk-driving legislation, one of the toughest in the nation, with a 43 percent drop in state traffic fatalities over the New Year's weekend. Larry Naake, executive director of the County Supervisors Association of California, said, "When it comes down to the drunk-driving law, I cannot conceive of any county not enforcing it."

If the suit succeeds, he said, he expected the legislature to be forced to provide up to $15 million a year for better county jail facilities, more supervisors and more court time.

A total of 23 statutes are mentioned in the suit, including laws requiring that stray county animals be killed by drug injection instead of asphyxiation and that counties provide copies of the state legal code to all residents who ask for it.

Twenty of the bills passed in 1981. Three other laws, including the stray-animal extermination provision, passed earlier and have already been the subject of claims against the state by some counties.

The state board of control recommended that the legislature pay $1,035,000 on those claims, including $186,000 for the animal provision. When the legislature cut the appropriation for these claims in its most recent session, "that was the last straw," Naake said.

Naake said a constitutional amendment written by Paul Gann, one of the authors of the famous tax-cutting Proposition 13, and approved by the voters in 1979 requires the state to fund adequately any new programs. State Sen. Milton Marks (R-San Francisco), chairman of the Senate Committee on Local Government and author of one of the laws named in the suit, said that some new laws may violate the Gann initiative, but that complaints about his bill to increase small claims court services were "asinine" because it provided for an increase in court fees to pay the new costs.

County officials say that such fee increases, which are also included in the drunk-driving laws, are inadequate.

The counties bringing the suit include Los Angeles County and represent about 75 percent of the state's population. Only two counties, Santa Clara and Del Norte, have declined to join the suit, Naake said, and others such as San Francisco are expected to join.