It shall be the duty of every magistrate in criminal proceedings to keep a docket thereof as in civil cases. All recognizances taken under section 29-506 or 29-507, together with a transcript of the proceedings, where the defendant is held to answer, shall be certified and returned forthwith to the clerk of the court at which the prisoner is to appear. The transcript shall contain an accurate bill of all the costs that have accrued, and the items composing the same.