\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={\label{lst:listing1}Listing}]
	Listing1
	\end{lstlisting}

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

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