Each aircraft has different loading zones, and the weight per bag and person is averaged.
As an example, the MD80 is heavy forward, so the majority of the bags are loaded in the aft, and averaged out at about 35lbs per bag.
Once the passengers are assigned seats, they are averaged out as well.
Most pilots already know their passenger load, and they use the baggage as ballast.
If loading the bags within the prescribed zones does not keep the center of gravity within the envelope prescribed, passengers will be moved.
If this doesn't solve the issues, some bags will be left off of the aircraft until the next flight, but this is rare, comparitively.