Section 22. The fee for attending before a district court or trial justice shall be one dollar a day, upon one warrant only, if there are two or more against the same defendant at the same time. If the defendant in a criminal case is brought in by a summons, the fee for attendance shall be the same as that taxed upon a warrant.