The number of shots you can take, that's shown in the viewfinder, is an estimation/approximation of what the camera expects to happen. It's not magic truth.