\documentclass[12pt,a4paper,ngerman]{article}
\usepackage{listings}
\usepackage{babel}

\lstset{captionpos=b}

\begin{document}
	Listing \ref{lst:listing1} (Should be 1)
	Listing \ref{lst:listing2} (Should be 2)
	Listing \ref{lst:listing3} (Should be 3)

	\begin{lstlisting}[caption={Listing}, label={lst:listing1}]
	Listing1
	\end{lstlisting}

	\begin{lstlisting}[caption={Listing}, label={lst:listing2}]
	Listing2	
	\end{lstlisting}

	\begin{lstlisting}[caption={Listing}, label={lst:listing3}]
	Listing3	
	\end{lstlisting}
\end{document}
