Thank you for your question. I look forward to working with you to provide you the information you are seeking for educational purposes only.
Under New York City's Administrative Code Section 27-2075, they do govern how many people can live in an apartment. It is 80sq. feet per person.
The code states:
a. No dwelling unit shall be occupied by a greater number of persons than is permitted by this section.
(1) Every person occupying an apartment in a class A or class B multiple dwelling or in a tenant-occupied apartment in a one- or two-family dwelling shall have a livable area of not less than eighty square feet. The maximum number of persons who may occupy any such apartment shall be determined by dividing the total livable floor area of the apartment by eighty square feet. For every two persons who may lawfully occupy an apartment, one child under four may also reside therein, except that a child under four is permitted in an apartment lawfully occupied by one person. No residual floor area of less than eighty square feet shall be counted in determining the maximum permitted occupancy for such apartment.
The floor area of a kitchen or kitchenette shall be included in measuring the total liveable floor area of an apartment but the floor area for private halls, foyers, bathrooms or water closets shall be excluded.
(2) A living room in a rooming unit may be occupied by not more than two persons if it has a minimum floor area not less than one hundred ten square feet in a rooming house, or one hundred thirty square feet in a single room occupancy.
b. The maximum number of persons who may occupy a dormitory shall not exceed the occupancy permitted under section sixty-six of the multiple dwelling law, and the regulations issued thereunder by the department.
c. On written demand by the department, or by the owner when he or she rents a dwelling unit or any time thereafter, the tenant shall submit an affidavit setting forth the names and relationship of all occupants residing within the dwelling unit and the ages of any minors. In the event of an increase in the number of occupants, the tenant shall advise the owner and, if the owner so demands in writing, the tenant shall submit an affidavit, setting forth the pertinent information regarding such increase in occupancy.
d. In any case where the birth of a child or its attainment of the age of four causes the number of persons or children to exceed the maximum occupancy permitted in this section, such excess occupancy shall be permissible until one year after such event.
e. In every rooming unit, a sign shall be posted showing the maximum lawful occupancy. Such sign shall be made and installed in the manner and location prescribed by the department and shall be maintained at all times.
The NYC courts hold though, neither an ordinary landlord nor a co-op can evict a tenant for overcrowding unless there is a violation placed against the property. He cannot evict you for violating the law unless he has been cited for a violation, but if the lease is expired, he can refuse to renew the lease if it would violate the law.