Whenever any person shall be imprisoned in any county other than the county in which the crime is alleged to have been committed, in violation of this chapter, the expense of such imprisonment shall be borne by the county in which such person is so imprisoned; provided, that whenever any prisoner shall be removed to another county under the provisions of the preceding section [33-3-13 N.M. Stat. Ann.] then, and in such case, the expense of removal and keeping such prisoner shall be paid by the county from which such prisoner was so removed.