In the US there are typically legal limits on how many people can be crammed into buildings and rooms. Those limits are based on experience in general and those of fire and rescue personnel in particular.
Unlike many laws and regulations, those governing buildings tend to be more data driven than is common. The trigger for technical and empirically driven building and land development regulations in the US was the Triangle Shirtwaist fire. Much of the data on human safety in buildings was drawn from the insurance industry's actuarial and claims data. Many of the improvements in life safety driven by that industry, e.g. UL is "underwriters laboratories" and the National Fire Protection Association [NFPA] is funded by the insurance industry but it's technical documents are based on consensus with professional fire fighters.
Unlike many laws and regulations, those governing buildings tend to be more data driven than is common. The trigger for technical and empirically driven building and land development regulations in the US was the Triangle Shirtwaist fire. Much of the data on human safety in buildings was drawn from the insurance industry's actuarial and claims data. Many of the improvements in life safety driven by that industry, e.g. UL is "underwriters laboratories" and the National Fire Protection Association [NFPA] is funded by the insurance industry but it's technical documents are based on consensus with professional fire fighters.