Updated coroutine counter to support callback