In all criminal cases in which a county pays costs or fees to any officer of any court, the amount of the costs and fees so paid shall thereupon become a claim against the fine and bond forfeiture fund for the benefit of the county. The claim for the benefit of the county shall at all times take the same priority of payment as against the fine and bond forfeiture fund as though the claim or the costs and fees were still held by the officer who received the payment. Upon payment of the costs or fees, the county shall become subrogated to the rights of the officer regarding payment out of the fine and bond forfeiture fund, with all rights enjoyed by the officer to enforce same at any time.