The sheriff shall annually, during the month of January, render under oath to the auditor a true statement of the account of all fines and costs collected by magistrates and transmitted to him or her and pay into the treasury of the state, the net proceeds of fines and costs as exhibited by the account, to be appropriated as directed by section 5, article XII of the constitution of this state. Failure to do this is a breach of his or her official duty. For the purposes of this section, the net proceeds of such fines and costs are the proceeds remaining after deducting therefrom:
(1) The cost of auditing the accounts of magistrates by the chief inspector's office; (2) the amounts of costs and fees paid into the regional jail and correctional facility authority fund of the state treasury by the clerk in the manner provided by section four-a, article three, chapter fifty of this code; (3) until a regional facility is provided pursuant to article twenty, chapter thirty-one of this code, the expenses and costs of operation and maintenance of the county jail or a regional correctional facility, other than a facility provided pursuant to article twenty, chapter thirty-one of this code, operated jointly with one or more other county or counties, and of constructing, reconstructing and renovating any jail facility used for county prisoners and of periodic payments, if any, for the establishment of a jail improvement fund in the manner provided by section nine, article one of this chapter for constructing, reconstructing or renovating any jail facility used for county prisoners; and (4) after a regional facility is made available to the county pursuant to article twenty, chapter thirty-one of this code, the expenses and costs of operation of the jail for the county in the form of the per day costs required to be paid into a regional jail and correctional facility authority fund pursuant to subsection (h), section ten, article twenty, chapter thirty-one of this code, the periodic payments, if any, for the establishment of a jail improvement fund in the manner provided by section nine, article one of this chapter, which shall thereafter be transmitted to the state treasurer and deposited in a regional jail and correctional facility authority fund, and the funds expended by the respective counties, if any, for expenses incurred in housing prisoners in local jail facilities used as holding facilities.