def cart_counter(request):
 cart = get_cart_from_request(request)
 return {u'cart_counter': cart.quantity}

def cart_counter ( request ) : cart = get_cart_from_request ( request ) return { u'cart_counter' : cart . quantity }
return number of items from cart .