Whenever, by any statute, a penalty or fine is imposed for the benefit of common schools, and not expressly of the common schools of a town or school district, it shall be taken to be for the benefit of the common schools of the county within which the conviction is had; and the fine or penalty, when paid or collected, shall be paid forthwith into the county treasury, and the treasurer shall credit the same as school moneys of the county, unless the county comprise a city, in which case he shall report it to the commissioner of education, who shall apportion it upon the basis of population by the last census, between the city and the residue of the county, and the portion belonging to the city shall be paid into its treasury.
N.Y. Educ. Law § 3801