I know this is long, I'm covering all angles. There's almost nothing on the limits of a holodeck, so I want my reasoning to be clear.
I dove into my "solve it all" source for Star Trek: The Next Generation for this and found ... almost nothing, but a few clues. After reading up on holodecks in the Star Trek: The Next Generation Writers' Technical Manual_ (Fourth Season Edition), I found almost nothing about holodeck capacity. There are different sized holodecks, which we never see. (As best I can remember, in all the versions of Star Trek that use a holodeck, we only see one set for each series.) There are personal sized holodecks, but also larger ones (which we've seen more of).
There are references in the WTM (Writers' Technical Manual) to "complete sensory environments," and "If you were getting close to the real walls, you might hear a soft but recognizable beep to get you back to the main illusion." There's also a reference stating, "The exact texture of sand, grass, concrete, rock, or steel is duplicated..." So the focus is on providing as seamless and complete an illusion as possible.
There is no reference at all to any difficulty in creating holograms. (Actually, they go into detail about how cheap OHDs, Omnidirectional Holo Diodes, are to make and to use.) They also don't go into computing time and memory being an issue. That is not mentioned at all, but it could become an issue. However, to use the Scottish town as an example, almost everything in the town would have to be tracked throughout the use of the program, so memory wouldn't be an issue. (For instance, if you throw a ball and it goes behind a building, even if you can't see it, the computer needs to keep track of it for realism and consistency.) Also, if computing time and memory were issues, Janeway would have been more reluctant to allow the crew to maintain an expansive program like the Scottish town.
There is, in the WTM, absolutely no reference to the limits of what a holodeck can do, but repeated emphasis on just how much it can do. However, I can find one limit that would create an issue: Space. The holodeck could create an environment around each individual in the town. Seven of Nine could be in a pub and Harry Kim could be in the field with a young lass. In illusion, they might be several hundred yards apart, but in reality, they might be within 10 feet of each other, but with holograms projected between them to make them both feel like they are in totally different environments within the same program.
Using holograms like this, which would include blocking one person's view of another and replacing it with an image of that person growing smaller as they walk off into the distance, a holodeck could surround each person with an individualized environment, as long as it had enough space to separate them from someone else nearby and to make sure they couldn't reach or move beyond the range of their environment and into another person's.
This would mean that each person would need roughly a space a meter in any direction for the holodeck to maintain the illusion for them. That would mean the limit for the number of people in a holodeck would be determined by how many people could fit in the room with a space of at least 2 meters (one meter for each person) between them.
That would be more of a limit than computing power or OHD capability.
(And it gets more complex, since you could link holodecks, so three or four people could go into the Scottish town from the biggest holodeck and someone else could enter at the same time in a small personal holodeck - and the computer could keep the continuity between the two matched so if the person in the personal holodeck went into the same pub as the people in the other holodeck, the OHDs could project images of all of them so they'd "see" each other when they meet in the pub.)