I recently fell into this same trap again.
I was using named number registers because naming something is just so much more sensible than using a number.
However I 'forgot' that there is no macro (or xyPerl function) that allows you to get the content of main named number register when you are in a frill block.
(using regular number registers, one would use the mr macro in order to do so).
After fiddling a bit with the nnx macro thinking that nnx was the equivalent of the mr macro, it finally daunted to me that the nnx macro does not allow you to specify an instance (first, last, previous or this) and the nnx is not the equivalent of the mr macro.
Big sigh and switched to using numbers in stead of names
Worse, I seemed to remember that I even open up an Idea on the SDL Ideas page about this specific problem.
But much to my surprise this (in my humble eyes) totally valid and useful request only got 2 up votes.
Which will make it a low priority item on the list of things to do for SDL engineering.
So please take a minute and up vote my idea here: https://community.sdl.com/ideas/contenta-ideas/i/ideas-xpp/access-named-number-registers-counters-from-a-frill-block
And I am convinced that some day you will be grateful that you did so.
Many thanks in advance