We confirm the Hanna Neumann conjecture for topologically finitely generated closed subgroups $U$ and $W$ of a nonsolvable Demushkin group $G$. Namely, we show that begin{equation*} sum_{g in U backslash G/W} bar d(U cap gWg^{-1}) leq bar d(U) bar d(W) end{equation*} where $bar d(K) = max{d(K) - 1, 0}$ and $d(K)$ is the least cardinality of a topological generating set for the group $K$.