Added counter to queue class.