We prove that under some assumptions on the mean curvature the set of umbilical points of an immersed surface in a $3$-dimensional space form has positive measure. In case of an immersed sphere our result can be seen as a generalization of the celebrated Hopf theorem.