Extend TaskManager.getUnfinishedTaskCount: fill up a designated set with finished tasks