Martin Luther King didn’t need a slide at all. Dick Hardt used 50 slides – per minute! Both used the ideal number of slides – for the story they wanted to tell on that day to that audience.
Rather than with a number of slides it’s much more useful to start with a story and then add slides as we need them. A slide is needed when it allows us to communicate something better with that slide than without it. Sometimes, we need a lot of slides, sometimes we don’t. Sometimes a slide needs a lot of time to explain, sometimes it doesn’t.
In essence, the simple (though, admittedly, not necessarily easy) answer to the question about the ideal number of slides is this: You need as many slides as you need.