How to make a players connect to a room even if it's not full?

I want to make a game which players can get into it and just be in the game without reaching the max players. like there will be a max of 10 players and if there will be there it will be ok too. Help?