The description of the magnificent mansion spell says:
It contains sufficient food to serve a nine-course banquet for up to 100 people
But can it only house 100 people or can you bring in as many people as you want?
The spell makes no explicit restriction on how many can be allowed in however the space is limited:
You can create any floor plan you like, but the space can’t exceed 50 cubes, each cube being 10 feet on each side.
If each person in question is Medium and have them require 5 by 5 feet (the space they need in combat) the house fits 200 people at the same time. You might be able to fit more than that, it's just dependent on how desperate you or they are which will affect how willing they are to be treated as cattle.
You might argue up to 600 people if there is nothing but narrow three-story bunk beds, but that seems like a reasonable limit (or the limit of reason) for people housed. (We have here ignored space occupied by the servants, if your DM wishes the workplace rights of temporary magical servants more respected, they may have to be counted among your 600.)
If you don't care about housing them at all and only fill them in, their footprint (hah puns!) could reasonably be reduced to a 2 by 2 feet square, you could fit 1250 people, which makes for quite a good party (of the festive rather than adventuring kind). (Again you might have to count the servant among these.)
Is there a hard limit? Well, if we consider each person as a box six feet tall, two feet wide and 1 foot deep, they only need 12 cubic feet each. The space itself is 50 by 1000 cubic feet and so a staggering 4166 people could volumetricly fit into the space. With it now being full to the brim with writhing bodies which have been tetrised into place, it might not qualify as a mansion anymore as it is more an atrocity onto humanity (humanoid-ity?) and probably a crime depending on whose jurisdiction you are in. Of course you might be able fit far more if you used something like goblins, kobolds, or fairies, but thats probably beside the point.