The 18 quintillion number comes from the maximum possible amount, based on the max value of a 64-bit unsigned integer. The actual number of planets in the game is notably smaller - not every possible galactic region coordinate is used, not every possible star in each region is generated, and not every planet in each system is generated. Origins takes advantage of that last one, to create additional planets in existing systems.