How do airliner manufacturers come up with typical capacities of their planes?
These numbers are based on mixed-class configurations and use of floor space for other things. The A380 for instance can theoretically be configured with 853 "economy" seats, but no-one I know of has bought one configured that way. Typical first-business-economy configuration is 525, and Emirates seats just 489 because its first-class section is basically staterooms, and it has showers and a bar taking up floor space (it also has an excellent and large business class instead of using the back half of both decks for coach).

When designing an aircraft's seating capacity, especially for long-haul flights, total cabin weight (passengers and cargo) must be taken into account. The more stuff you're hauling, the less weight allowance you have for fuel, and therefore your range is reduced. Therefore, increased room per passenger on long-haul flights isn't just for passenger comfort, it's often a necessity to reduce total cabin weight and thus be able to max out the fuel load to get between the airports non-stop. Operators of shorter flights don't care as much because you can pack them in like sardines and still have plenty of fuel to get them where they're going.

Therefore, dimensions of various classes of seat differ by airline, aircraft and route (Lufthansa, for instance, operates three different A380 configurations based on the routes they run). The typical coach seat is between 17 and 19 inches wide (including half the armrest), and has a "pitch" (space between seats which determines the legroom and ability to recline) of between 31 and 35 inches.

For business class in three-class planes it gets a bit better; seat width averages about 21" and a pitch of about 38" (more for planes outfitted with lay-flat seats). First class ranges widely by aircraft type and airline (it's truly "first-class" in aircraft with three-class configuration; in two-class what's called "first" is closer to business class), but typically offers room to spare especially on long-hauls.

Coupled with required/desired aisle widths and additional amenities that widen the seats or replace them in certain areas of the cabin, it's fairly academic to count up how many seats you can fit aboard a particular airframe.