Quantitative approach to diversity and decline in Late Palaeozoic trilobites