use counter for queue length