How to make closed tasks appear in numbers on the dashboard

How to make closed tasks appear in numbers on the dashboard, has anyone managed to do this or have any idea how to do it?
WhatsApp Image 2023-02-27 at 09.08.34