The sureties of all clerks, sheriffs, constables, collectors and other county officers shall be residents of the county in which the bonds to which they become parties, by reason of being sureties for any of the said officers, shall be executed.