Any number of individuals living together as a single, nonprofit, housekeeping unit and doing their cooking on the premises, when said individuals are related by blood, marriage or adoption, including any number of foster children under the care of same; or no more than five unrelated individuals living together as a single, nonprofit, housekeeping unit. This definition excludes the occupants of a club, fraternity or sorority house, community residential facility, transient establishment, such as a halfway house for recovering drug addicts and alcoholics, lodge, residential club, boardinghouse or rooming house, and also excludes unrelated mentally ill persons unless certified by county mental health/mental retardation programs as capable of residing in a dwelling, and further excludes unrelated persons receiving treatment under Article
III, Involuntary Examination and Treatment, or Article
IV, Determinations Affecting Those Charged with Crime or Under Sentence, of the Act of July 9, 1976, P.L. 817, No. 143, known as the "Mental Health Procedures Act."