added check for item count in cart