\documentclass[tikz, border=1cm]{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=1.18}
\usepackage{contour}
\contourlength{0.5pt}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
ybar,
width=10cm,
height=6cm,
ymin=0,
title=Firsidet og sekssidet terninger efter 50. kast,
xlabel=Øjnenes sum,
ylabel=Hyppighed,
xtick={2,...,10},
nodes near coords style={font=\boldmath\tiny, white, rotate=90, anchor=east},
every tick label/.append style={font=\footnotesize},
label style={font=\footnotesize},
]
\addplot[
fill=blue!70,
nodes near coords=\contour{black}{\pgfmathprintnumber{\pgfplotspointmeta}},
]
table[x=sum, y=hyp]{
sum hyp
2 1
3 6
4 5
5 7
6 3
7 12
8 9
9 5
10 2
};
\end{axis}
\end{tikzpicture}
\end{document}