In a longtable, I need the first column to display numbers based on an enumeration by references to labels. This means I can refer to the rows somewhere else in the text.
I imagined it would help to create a label and reference to that label in the same cell, but I keep getting 1-figures instead of an incrementing number.
Here's an example of what I have:
\documentclass[a4paper]{article}
\usepackage{longtable}
\begin{document}
\begin{longtable}{|l|l|}
\hline
\textbf{Number} & \textbf{Title} \\
\hline
\endfirsthead
\label{row:thefirst}
\ref{row:thefirst} &
First \\
\hline
\label{row:thesecond}
\ref{row:thesecond} &
Second \\
\hline
\label{row:thethird}
\ref{row:thethird} &
Third \\
\hline
\end{longtable}
\end{document}
I have tried changing the "row:" to something like "itm:" or "fig:", but nothing helps.
Perhaps, I need to put it in some context like when using \begin{figure}, but I am not sure how that would turn out when in a table cell.
Any suggestions? Thanks!

\labelalways refers to the last counter stepped with\refstepcounter(or actually whatever counter is saved in\@currentlabel), independently from the label name you choose. In your case it is thetablecounter as\begin{longtable}does\refstepcounter{table}internally. You need some counter that is stepped every row if you want to be able to refer to the rows. – cgnieder Dec 20 '13 at 15:13