Calculating number of people dynamically