One of the biggest reasons for the change in size of the iPhone 5 is because it has a larger 4in screen with a 16:9 aspect ratio, rather than the 3:2 aspect ratio used on the iPhone 4S. What this means in practice is that both screens are the same width, but the iPhone 5s is slightly taller, with a resolution of 1, 136x640(the iPhone 4S had a resolution of 960x640), maintaining the same high 326ppi.
Thats still a Retina display, which Apple defines as a screen where you cant see the individual pixels.