I have a blog with 28 articles in it on Shopify. I am paginating by 5 articles for the blog, i.e. {% paginate blog.articles by 5 %}
I am trying to count the number of articles in the blog and have tried both the following methods:
Method 1:
{% for article in blog.articles %}
{% assign count = count | plus: 1 %}
{% endfor %}
{{ count }}
Method 2:
{{ blog.articles.size }}
The issue I am facing is that in both cases, the output is 5. The answer I am expecting is 28 - clearly it is only counting the number of article within the page. I also am trying to filter by tags, where I want to see the amount of results from the tag search. Any solutions would be highly appreciated.
blog.articles_count
to get total count – Onkar