It can be proven that if h(s) never overestimates a state's distance to the final state, then A* search is optimal, that is, it will find a shortest solution if one exists.
As mentioned, the number of tiles out of place heuristic for the 8-Puzzle problem does not overestimate.