und wohin wird der finishedCount zurückgegeben? und was bringt der while loop in der main genau?