Count finished tasks