I can't speak for the entire world, but in Europe, the answer would be: none. Passports were first created during the First World War as a way to root out enemy subversives trying to enter the country to do harm. Prior to that, you wouldn't have needed a passport to enter a country, because no one would have been there to stop you in the first place. Oddly enough, Europe, through Schengen, has pretty much reverted to that status, at least internally, the current situation on the German/Austrian border not withstanding.
You should check out Policing Paris by Cliff Rosenberg. He details the origins of immigration control in Europe if you're interested in further reading.