Boundary Value Problems for Elliptic PDEs and the Morse Index