In criminal matters, including preliminary and juvenile hearings, the county court shall receive, for any and all services rendered up to and including the judgment or dismissal of the action and the issuance of mittimus or discharge to the jailer, the sum of eighteen dollars.