I have had problems with the bibliography title and the Table-of-contents title not being numbered and not showing in the ToC. To solve it I used the tocbibind package.
By adding the line:
\usepackage[numbib]{tocbibind}
to my preamble both the bibliography title and the ToC title appeared in the ToC. And the numbib value added a numbering to the bibliography.
I am still missing the numbering of the ToC, though:

As you can see in the ToC list the "Contents" title appears as it should but without a numbering. The "Contents" title (in red) did get a number though, when I added this package, but the number is wrong. As you can see, it has the number 2, which is already taken by the "Preface" title.
So it seems the numbering is not working properly and in any case not added to the ToC. Looking through the documentation of the tocbibind package, I couldn't find any notion of this, but if it can be fixed with this package, that would be good. Else, how can I fix this?
My code structure:
\documentclass[11pt,a4paper]{article}
\usepackage[utf8x]{inputenc} %Character set
\usepackage[numbib]{tocbibind}
...
\begin{document}
\section{Abstract}
Text text text
\section{Preface}
Text text text
\pagebreak
\tableofcontents
\pagebreak
\section{Introduction}
Text text text
...
\end{document}

\makeatletterand\makeatotherare necessary? – Steeven Jun 15 '15 at 09:55\makeatletterand\makeatotherdo? – egreg Jun 15 '15 at 10:01