Every county in which is located a city of the primary class shall have power within the county, except within the area over which zoning jurisdiction has been granted to any city or village and over which such city or village is exercising such jurisdiction, to regulate and restrict (1) the location, height, bulk, and size of buildings and other structures, (2) the percentage of a lot that may be occupied, (3) the size of yards, courts, and other open spaces, (4) the density of population, and (5) the locations and uses of buildings, structures, and land for trade, industry, business, residences and other purposes. Such county shall have power within the county, except within the area over which zoning jurisdiction has been granted to any city or village and over which such city or village is exercising such jurisdiction, to divide the county zoned into districts of such number, shape, and area as may be best suited to carry out the purposes of this section, and to regulate, restrict, or prohibit the erection, construction, reconstruction, alteration, or use of buildings, structures, or land within the total area zoned or within districts. All such regulations shall be uniform for each class or kind of buildings throughout each district, but regulations applicable to one district may differ from those applicable to other districts. Such zoning regulations shall be designed to secure safety from fire, flood, and other dangers and to promote the public health, safety, and general welfare and shall be made with consideration having been given to the character of the various parts of the area zoned and their peculiar suitability for particular uses and types of development and with a view to conserving property values and encouraging the most appropriate use of land throughout the area zoned in accordance with a comprehensive plan. The provisions of section 23-114 which relate to manufactured homes shall apply to such zoning regulations. Such zoning regulations may include reasonable provisions regarding nonconforming uses and their gradual elimination.