I agree with rob
here's the usage of rob's change.
Task {
addCounter()
if let foundCounter = await getCounter2(number: 5) {
print("Found counter with number: \(await foundCounter.number)")
} else {
print("No counter found with the given number.")
}
}