In all counties of the State wherein magistrates are allowed by law to appoint a constable, such constable so appointed receiving a salary from the county in lieu of all costs and fees in criminal cases, the governing body of the county shall deduct from the salary of such constable all sums paid to any other person for service rendered the county in criminal cases while acting under appointment by such magistrates on a particular occasion, unless it is proven to the satisfaction of the governing body that such services were rendered in an emergency wherein it was impossible for the constable entitled to the salary to perform the services.