Get total number of items in cart

I want to retrieve the total number of items in the cart. I’ve tried traversing the const state = Snipcart.store.getState(); object but it always shows 0 items even when cart is full.