Counting eigenvalues using coherent states with an application to Dirac and Schrödinger operators in the semi-classical limit