Add getPendingCount to Queue.