On Ubuntu Linux, I find /usr/share/TeXmacs/styles and /usr/share/TeXmacs/packages and in the various subdirectories there, I find the .ts files that define things like that. I've learned quite a lot by opening those files with TeXmacs and viewing them.
So in /usr/share/TeXmacs/packages/section/section-base.ts I find the
new-section macro. It calls new-counter. So there are "counters" for those, and thus you can very probably set them... I find /usr/share/TeXmacs/packages/standard/std-counter.ts and within it, I learned about the new-counter macro, which is right at the top.