Mathematical modelling of the COVID-19 pandemic with demographic effects