A setting can be a location or an era, depending on the book.
For detective stories, the era is often historical or modern. The setting can be many different locations in one book, such as MI6, the car factory, underground basements, etc.
So how many settings should a normal book have, in order to avoid confusion by the reader?
My thoughts are:
One era setting, unless time-travelling. If this is the case, then up to 5 era settings. As many locations as you need.
Around 10 location settings, one era if this is a modern story. Chasing someone around a city can count as one location, but entering multiple buildings and conversing with the patrons inside can be an individual location.