The county judge shall be allowed the sum of five dollars for every allowance of the writ of habeas corpus and the hearing and determining of the case upon the return of the writ, which sum, together with the fees of the clerk, sheriff, and witnesses in the case, shall be taxed by the judge on his or her return of proceedings on the writ, and the same shall be taxed and collected as part of the original costs in the case whenever the person brought before the judge on the writ was in custody by virtue of the proceedings in any case in which such person is charged or attempted to be charged with the commission of any criminal offense, and when such person shall either be held to bail, or shall be remanded to custody by the judge, but when such person shall be wholly discharged by the judge the costs shall be taxed to the state, and paid out of the county treasury of the proper county, upon the order of the county board; Provided, no person or officer shall have the right to demand the payment in advance of any fees which such person or officer may be entitled to by virtue of such proceedings on habeas corpus, when the writ shall have been issued or demanded for the discharge from custody of any person confined under color of proceedings in any criminal case.
Neb. Rev. Stat. §§ 29-2824