The sheriff, in a county of the second class, shall be entitled to such a number of deputies as a majority of the circuit judges of the circuit court shall deem necessary for the prompt and proper discharge of the duties of the sheriff’s office; provided, however, such number of deputies appointed by the sheriff shall not be less than one chief deputy sheriff and one additional deputy for each five thousand inhabitants of the county according to the last decennial census. Such deputies shall be appointed by the sheriff, but no appointment shall become effective until approved by a majority of the circuit judges of the circuit court of the county. A majority of the circuit judges of the circuit court, by agreement with the sheriff, shall fix the salaries of such deputies. A statement of the number of deputies allowed the sheriff, and their compensation, together with the approval of any appointment by such judges of the circuit court, shall be in writing and signed by them and filed by the sheriff with the county commission. A deputy sheriff as the term deputy sheriff is defined under section 57.015 shall hold office pursuant to the provisions of sections 57.015 and 57.275.