The cartoon shader in the sweetFX suite is exactly that. So it's already done.
And you may try to combine it with the cel shader as suggested by kingeric1992
Try this settings as a startinf point. 0.30 and 0.40
here's an example of a heavy setting for cartoon. Depending on your settings it can also act as a local contrast to bring out detail.