One way would be to range through the children of .Content
or an outer Shortcode.
Here is a technique for counting the children of a Shortcode: Range over the children of a Shortcode - #6 by onedrawingperday
It can be adapted as needed.
The general idea would be to create the numbering within the scope of a: range $i, $e := $inner
$i
stands for index
$e
for element