The example is wrong, indeed -- iirc, the transformations were not returning `$null` in the initial design, because they were supposed to be a property of a valid value. Not sure if there is any transformation returning `$null` right now.
However, changing this behaviour might break other existing configs, so this has to be discussed and analyzed properly.
Right now probably the `{s.count,;}` should be used to get what is the max index.
* https://www.kamailio.org/wiki/cookbooks/5.3.x/transformations#scount_c