In every criminal case the clerk of the court in which the accused is convicted shall, as soon as may be, make up a statement of all the expenses incident to the prosecution, including such as are certified to him by a justice under the preceding section; and execution for the amount of such expenses shall be issued and proceeded with, and article four of this chapter shall apply thereto in like manner as if, on the day of completing such statement, there was judgment in such court in favor of the state against the accused for such amount as a fine.