The superconformal index of class $ \mathcal{S} $ theories of type D