Where a city of the second class or village does not have sufficient funds to purchase equipment to maintain and keep its streets in repair, such city or village may contract with the county in which it is situated to have the county maintain and keep its streets in repair. The cost of such maintenance and repair shall be paid by such city or village to the county.