Generalized Eulerian numbers and the topology of the Hessenberg variety of a matrix