Is there a simple way to get the number of rows in a given tabular?
Use some of the ideas in Coounter for use in array/tabular cells. Below I've added \savetabularrows{<label>} which stores the number of rows using the traditional \label-\ref system. This allows you to \ref{<label>} it elsewhere in the document, or use \thetabrow directly (after the table):

% https://tex.stackexchange.com/q/65649/5764
\documentclass{article}
\usepackage{array}% http://ctan.org/pkg/array
\makeatletter
\def\insert@column{%
\the@toks \the \@tempcnta
\global\advance\c@tabcol\@ne
\ignorespaces \@sharp \unskip
\the@toks \the \count@ \relax}
\let\old@arraycr\@arraycr
\def\@arraycr{\global\c@tabcol\z@\global\advance\c@tabrow\@ne\old@arraycr}
\let\old@tabarray\@tabarray
\def\@tabarray{\global\c@tabrow\@ne\global\c@tabcol\z@\old@tabarray}
\newcommand{\savetabularrows}[1]{\edef\@currentlabel{\arabic{tabrow}}\label{#1}}
\makeatother
\newcounter{tabcol}\newcounter{tabrow}
\begin{document}
The following \verb|array| has \ref{arrayrows}~rows.
\[
\begin{array}{ccc}
(\thetabrow,\thetabcol) & (\thetabrow,\thetabcol) & (\thetabrow,\thetabcol) \\
(\thetabrow,\thetabcol) & (\thetabrow,\thetabcol) & (\thetabrow,\thetabcol) \\
(\thetabrow,\thetabcol) & (\thetabrow,\thetabcol) & (\thetabrow,\thetabcol)
\end{array}
\savetabularrows{arrayrows}
\]
The following \verb|tabular| has \ref{tabularrows}~rows.
\begin{center}
\begin{tabular}{ccc}
(\thetabrow,\thetabcol) & (\thetabrow,\thetabcol) & (\thetabrow,\thetabcol) \\
(\thetabrow,\thetabcol) & (\thetabrow,\thetabcol) & (\thetabrow,\thetabcol) \\
(\thetabrow,\thetabcol) & (\thetabrow,\thetabcol) & (\thetabrow,\thetabcol) \\
(\thetabrow,\thetabcol) & (\thetabrow,\thetabcol) & (\thetabrow,\thetabcol) \\
(\thetabrow,\thetabcol) & (\thetabrow,\thetabcol) & (\thetabrow,\thetabcol)
\end{tabular}%
\savetabularrows{tabularrows}%
\end{center}
\end{document}
\documentclass{...}and ending with\end{document}. – Oct 05 '14 at 09:23\begin{tabular} \t@b \end{tabular}given\t@b(or equivalently the number of occurences of\\inside\t@b). – Arkandias Oct 05 '14 at 09:37pgfplotstableand thedatatoolpackage provide high-level support for database table. Also see this database-related question. – Oct 06 '14 at 11:37