Show a list of related content

Sorry to resurrect this old one. If I wanted to make that 5 (to show only five related content) a variable, definable in config.toml, how can that be done?