NYS code doesn't really mean anything. Each village/municipality has it's own code and it is usually broken down by zoning.
I live in NYS.
I have a flock of 23 chickens.
I don't live within village or city limits though. I'm in the "town" area zoned residential 1 where parcels are measured in...