As long as he wants I think.
(I think the past season will have been the last of their seriously poor performances. They'll get progressively stronger over the next 2-3 seasons because they'll keep spending big. I don't think their fans realise it but I think united will be stronger than Liverpool, Spurs and anyone else in terms of churning out results in the remaining time that Mourinho is there. Pep will have to work really hard to make sure we are constantly improving ourselves in order to stay ahead of the pack.)