Added function for getting queue item count.