I believe the maximum-4-unrelated-residents rule is newish, though maybe it's the enforcement that's new. (I recall reading about Somerville getting a list of student addresses from Tufts so it could be enforced.) It's definitely aimed at student apartments, not houses of ill repute - or maybe student houses are the new houses of ill repute, in the literal (not euphemistic) sense of the phrase.
RE: Jinkies!