One of the plot problems that science fiction authors deal with regularly concerns the size of the population necessary to support a given level of technology. I recently reread James Blish's Cities in Flight novels (originally published between 1955 and 1962). In those stories, a fair-sized chunk of New York City has been converted into a stand-alone spacecraft capable of interstellar flight, visiting planets and selling knowledge-based services to the local settlers. Blish assumes certain technologies that reduce the need for people. The City Fathers are self-programming self-repairing artificial intelligences that handle a wide variety of activities (eg, teaching once students reach a certain level). Processed algae grown in vats provides the necessary food, minimizing the number of people involved in agriculture. Even so, Blish recognizes that a city with a couple million people is not truly self-sufficient. New York takes payments in radioactive elements to power its reactors, and accepts immigrants with useful skills. Most of the other-world colonies they deal with been unable to maintain the level of technology the colonists arrived with.
What defines "today's" technology? I suggest (and this is a subject about which reasonable people can certainly disagree) that the defining piece of tech in the contemporary world is the ultra-large-scale integrated circuit. Everyone (well, certainly everyone reading this) comes in contact with it every day. Our computers, mobile phones, televisions, modern medical scanning and even cars all depend on such circuits . The ability to produce them requires a very high level in several different disciplines: mechanical engineering, chemical processing, and software to name three. If a society is capable of designing and producing such circuits, the rest of high tech follows. Take away those billion-transistor circuits and you have to settle for much less advanced alternatives in most tech areas. For example, purely analog television can be done with vacuum tube technology; but digital television requires integrated circuits performing hundreds of millions of calculations per second to decompress the bit stream, resize the image to match the display device, etc.
The ability to manufacture state-of-the-art integrated circuits sits at the top of a number of pyramids. The people who design and fabricate the devices require enormously specialized education, so there needs to be an education pyramid. The fab lines themselves are miracles of mechanical engineering, positioning different pieces of the machinery to an accuracy measured in billionths of a meter. Incredibly pure chemical compounds are required, hence entire chemical engineering and mining industries. Water at (for most other purposes) ridiculous purity levels. Large electricity inputs. Billions of dollars in capital, implying sophisticated financial institutions. The engineers and teachers need medical care, and dry cleaning, and day care for their children, and everyone needs various forms of entertainment. Police and fire fighters. Construction workers. Insurance agents. Plumbers. Farmers.
One thing too often unremarked is that all of those "support" personnel have to be rich enough to afford products built around the integrated circuits that are being built. If "...there is a world market for maybe five computers"  is true, no one is going to spend billions on a fab line plus all of the ongoing expenses to operate it. There has to be a market for millions of devices, and more likely tens of millions. That rules out one whole group of science fiction scenarios, where a small technologically advanced aristocracy lives on the backs of millions of serfs. At least, it rules those scenarios out until such time as the tech itself can become self-sustaining (in which case, one wonders why the aristocracy would bother with all those serfs).
Based on all of the above, my own guess as to the minimum population necessary to support production of integrated circuits at today's level of complexity is between 30 million and 50 million people, to provide the capital, the markets, and all of the human infrastructure. In addition, I would guess that there would need to be at least one urban/suburban complex comprising at least three to five million of those people. Cities appear to be a necessary, but not sufficient, condition for developing and maintaining tech.
 I'm not arguing either side of the Peak Oil debate here. Nor am I asking questions about sustainability in the sense of natural resource use. I'm just asking a speculative question about the relationship between population and technology.
 Image from Ancient Egyptian and Greek Looms, H. Ling Roth, Bankfield Museum, 1913.
 General Motors says that two-thirds of the engineering expenses for a recently developed hybrid automotive transmission was for developing and debugging the software that ran on a dedicated embedded processor and made the transmission possible. Modern jet fighters are designed to be unstable in flight in order to improve maneuverability; the pilots' controls provide "suggestions" to the software that actually flies the plane.
 This quote is generally attributed to Thomas Watson, head of IBM, although there's no evidence that he ever actually said it.