Couting the number of new tasks and migrations