I'm trying to achieve customized numbering while listing all items in an array.

All items in array are rendered using ng-repeat & ui.sortable.

**Numbering must be done in such a way that, for an array item "statement", count should not be increased & displayed.**
(*Else I may be used $index instead of an external count.*)

**For any other array item, count should be increased & displayed.**

The solution that got me the the closest result was the one where I passed $index into a filter function written in the controller.

like in HTML:

```
<li ng-repeat="question in questions">

<div class="no"> {{ filterIndex(question.question, $index) }} </div>
<div>{{question.question}}</div>

</li>

```

in controller:

```
    var filterValue = 0;

    $scope.filterIndex = function (value, count) {

        if (count === 0) {
            filterValue = 0;
        }

        if (value !== 'statementText') {
            filterValue = filterValue + 1;
            return filterValue;
        }
        else {
            return '"';
        }

    };

```

Even it was working without any errors, **the count returned from function is not get updated** like we get with $index when we update the order using ui-sortable.

see it here: [js-fiddle using filter function](http://jsfiddle.net/PwQUC/61/)

means, once it rendered **(4)** in **<[ (4) fourth question ]>** will remain same even if we moved it to top or bottom by dragging.

I tried different ways and almost everything ended up on **'Maximum iteration limit exceeded.'**.
Real scenario is a little bit complex as it contains nested ng-repeats and similar counting with digits and numbers alternatively in child loops.

Here is link to start fresh:
[js-fiddle](http://jsfiddle.net/PwQUC/60/)