Four is the minimum for a D&D party and pretty much assures that the characters will be of the four core classes since these roles must be covered. A 6-member party allows a bit of variety and encourages play of rangers and warlocks, plus whichever classes get added later (like paladins and druids).