(a) In judgments against the defendant, a judgment for costs shall be rendered in addition to the other punishment. This judgment shall be taxed by the clerk and shall be for the benefit of the officers rendering the service.
(b) In case of failure by the defendant to pay the costs, they shall be paid by the county where the conviction is had.