The sheriff or tax collector shall pay the county taxes to the county treasurer or other lawful officer. He shall at no time retain over three thousand dollars for a longer time than ten days, under a penalty of two per centum per month to the county upon all sums so unlawfully retained, and shall,…