Local Euler characteristics of $A_n$-singularities and their application to hyperbolicity