Fredholm properties and nonlinear Dirichlet problems for mixed type operators