code: public int getCompletedTasks() {
      int completedTasks = 0;
      for (TaskState taskState : this.taskStates.values()) {
        if (taskState.isCompleted()) {
          completedTasks++;
        }
      }
  
      return completedTasks;
    }
docs: Get the number of completed tasks.
  
  @return number of completed tasks