introduce counter for pending task