When trying to use a counter value within \index an odd behavior occurs.
It seem as if the value would be evaluated at the end of the document, when the counter has already been changed.
Therefore all the occurrences of the counter have the same value.
\documentclass{article}
\usepackage{makeidx}
\makeindex
\begin{document}
\section{First Section}
\index{first \arabic{section}}
\section{Second Section}
\index{second \arabic{section}}
\section{Third Section}
\index{third \arabic{section}}
\printindex
\end{document}
results in the following index:

though I would like to have:

