![](https://secure.gravatar.com/avatar/cedc4d83943006afe3994fb0a0455f82.jpg?s=120&d=mm&r=g)
Hi, How could I get the number of sections in a document please? Example application: --8<---------------cut here---------------start------------->8--- \doif{\nofsections}{1}{\setuphead[section][number=no]} \starttext \startsection[title=title 1] section 1 \stopsection %\startsection[title=title 2] section 2 \stopsection \stoptext --8<---------------cut here---------------end--------------->8--- I've done it like this: --8<---------------cut here---------------start------------->8--- \definedataset[mydata] \doif{\datasetvariable{mydata}{1}{nofsecs}}{1}{\setuphead[section][number=no]} \starttext \startsection[title=title 1] section 1 \stopsection %\startsection[title=title 2] section 2 \stopsection \setdataset[mydata][nofsecs=\structurenumber] \stoptext --8<---------------cut here---------------end--------------->8--- But I don't know, if this is the right way... TIA for any help, -- Peter