Is there a way of obtaining the current number of a counterbox? Say for instance that in a new notebook you create 3 section cells. Then by evaluating the command:
CellPrint[Cell[TextData[CounterBox["Section"]]]]
You can see now many cells with the style "Section"
you have created up to the point at which you evaluated the command.
Is there a way of obtaining the the number of "Sections" created without having to print a cell displaying a CounterBox? I would like to do something like:
GetCounterNumber["Section"]
and it should return the total number of Sections created. It should behave similarly for subsections and other cells that have counters.