§ 319-a. Employment of a stenographer upon hearing on charge of felony. In a hearing held in a criminal proceeding upon a charge of felony, in a town or village court, unless pursuant to law a stenographer be regularly employed by it, such court may, if the defendant be represented by counsel, employ a stenographer to take testimony on such examination. The compensation of such stenographer shall be fixed by the board of supervisors and shall be a county charge.