The state of California has 58 counties. Counties are responsible for all elections, property-tax collection, maintenance of public records such as deeds, and local-level courts within their borders, as well as providing law enforcement (through the county sheriff and sheriff's deputies) to areas that are not in cities.