As far as I've seen (TOS and first seasons of TNG), only six people can beam elsewhere from the ship (as there are six pads). It seems that this limit doesn't apply vice versa: (TOS: Day of Dove, TNG - one of the episodes in 1 season), more than 10 people can be beamed up. Is there any logic behind that? What is the real capacity of the transporters?
The simple answer is that the Galaxy-Class Starship has personnel and cargo transporters in other parts of the ship that can be temporarily re-tasked if there's a need to transport larger numbers of people than a single transporter room can handle
Normally the transport buffers are used to move people in groups of six but if the need does arise, there are three transporter rooms (each with six buffers), four cargo transporters capable of moving 10 people at a time, plus a further six emergency transport stations each with their own set of 22 transport pads that can be used to exit the ship
The (semi-canonical) TNG Technical Manual specifically speaks to the question of maximum capacity, both beam-up and beam-down;