Spectral estimation of Hawkes processes from count data