Edge states and the bulk-boundary correspondence in Dirac Hamiltonians