Namely, less than seven. Dwarves make friends, which means when friends die, they go insane and that ruins the whole point. The idea behind the command bunker is to have one dwarf with no friends, who won't care when the fort is slaughtered, and have this dwarf persist here so that even if everything dies, he'll be able to stay until the next migrant wave.
To best achieve this, you need
1) A small farm plot, 1x2 is probably enough growing plump helmets year-round, or other plants if you have available farm space and want to provide some variety for them.
2) A still, to brew these grown plants into booze.
3) A few good barrels, too many is better than too few.
Optionally
4) A kitchen, you're going to have leftover seeds that can be cooked into tasty tasty roasts.
5) Some fantastic furniture, like masterwork steel tables. Having legendary arrangements will ensure that he's pretty much always ecstatic and less likely to tantrum ever. This may (read "will") make nobles jealous of his lavish decorations.
Things you do not need
1) A door, they should be walled in entirely. Either build the north wall last to ensure your mason is outside, or have the lever-puller himself build the last south wall. You can un-burrow them at this point, since they're locked in. Building destroyers can knock down doors, hatches, and sometimes bridges. Also windows, those aren't safe. Walls only.
2) Other Dwarves, on the off chance that one of them dies, the other will be very sad.
3) Pets, see above. Non-pet animals, like a cow for milk, is ok but not ideal.