Getting an zero index and count for an entry list
There's an easier way... Twig has a built-in variable in for-loops called loop, which has loop.index and loop.index0 properties which output exactly what you're looking for:
https://twig.symfony.com/doc/3.x/tags/for.html#the-loop-variable
{% for project in sliderWork %}
   &lt;div class=&quot;progress__wrap&quot;&gt;
   &lt;span data-slick-index=&quot;{{ loop.index0 }}&quot; class=&quot;progressBar&quot;&gt;&lt;/span&gt;
     &lt;p&gt;&lt;i class=&quot;number&quot;&gt;{{ loop.index }}&lt;/i&gt;{{project.title}&lt;/p&gt;
   &lt;/div&gt;
 {% endfor %}