See this thread: http://archive.contextgarden.net/message/20120402.144627.e46a9f9f.en.html
and try to construct a "minimal example" next time.
I converted my number to counter and shrinked my example - but the problem still occurs: Instead of the counter value when I set the reference I get always the latest value: Should be 1: 3 Should be 2: 3 Should be 3: 3 instead of Should be 1: 1 Should be 2: 2 Should be 3: 3 ---8<------shrinked example-------------- \unprotect \definecounter[ParagraphCounter][way=bysection,prefix=no] \def\markParagraph[#1]% {\getrawparameters[Paragraph][mark=,#1]% \incrementcounter[ParagraphCounter]% \expanded{\textreference[\Paragraphmark]{\convertedcounter[ParagraphCounter]}}} \protect \starttext \markParagraph[mark=aaa] \input tufte \markParagraph[mark=bbb] \input tufte \markParagraph[mark=ccc] Should be 1: \in[aaa] Should be 2: \in[bbb] Should be 3: \in[ccc] \stoptext