Fixed queue count with deleted versions (bug 873359)