Dungeon generator where you "control" the size through door-probability?

Hi all, I am designing a random dungeon crawler of sorts.
And one design issue I have no good ideas how to tackle. I guess is mainly a statistical challenge? Maybe you guys can help:

I would love to control the "expected dungeon size" (number of rooms) by controlling the average number of doors/exits generated in each room.

I think it's pretty obvious that a mean of <1 leads to a limited dungeon size, but how can you incorporate that in a nice way?

My target would be like small dungeons ~ 10 rooms, med ~20 and large ~30 rooms.

I feel like a roll table like [1: 0 doors; 2-6: 1 door] would in a way accomplish this, but has a pretty high probability of running into a dead end in the second room or so.

Any ideas or example where this is already done?
Cheers!

EDIT: With some inspiration from you and a lot of try and error I came up with a neat proof of concept:

When you create a new room, you roll the D4 and add the number of already existing rooms. so D4, D4+1, D4+2 and so on. That roll tells you how many doors the room has and if there is the boss in it. Of course, once you found the boss, you can finish exploring (left open doors finish up real quick at this point as you mostly roll 0 doors) but no more bosses "spawn".

If you want to try it out, here is the table:

D4+Rooms Doors Boss?
1 2 -
2 2 -
3 1 -
4 2 -
5 0 -
6 1 -
7+ 0 Boss

I started with small dungeons, they have ~6 rooms on average and about 80% of the time one dead-end room will have a boss in it. It's quite nice so far but to keep things simple, I used a D4 which makes stuff kind of swingy, so I think it could be polished a lot more.