You may have one apartment, as long as it is part of the main house and you, the owner, live in the house. You may not have an apartment in an outbuilding and you may not rent out both the main house and apartment. There are quite a few rules regarding accessory apartments. Consult Planning & Zoning.