Count and save in variable number of elements present in a page


what solution can i use to count the number of elements in a page and save the number in a variable ?

I add an image to better understand what I mean

I need 3 variable with saved 5 (number of element for group of link).

Here the original page, see footer

Need to predict case with 0 element

What solution can i use to do this ?


Maybe sourceSearch | regex=... | count if you can create/find a good regular expression.

Thanks but i can not find a simple solution to do this.

If some users can help me to create a macro code for this will be appreciated