Every county shall provide jail services, at the expense of the county, for the safekeeping of prisoners lawfully committed.