fix count of the tasks in the main