I am using the following code to count the orders f a counter at additional scripts for checkout
{% assign customer = customer %}
{% assign order_count = 0 %}
{% for order in customer.orders %}
{% assign order_count = order_count | plus:1 %}
{% endfor %}
But I am getting the value 0.
I have orders under that account. Can someone please let me know how to get the actual value.