A county clerk is entitled for the services specified to the following fees:\n1. for performing any duty of a sheriff in an action in which the sheriff, for any cause, is disqualified, the same compensation to which a sheriff is entitled for the same services; and\n2. for confining a sheriff in a house by virtue of a mandate, and maintaining him while there, two dollars for each day, to be paid by the sheriff, before he is entitled to be discharged.
New York Legal Code