How does the game engine use nebulae anyway? I can't find a text file with the graphic's names. Does it use any graphics with the name "nebula#.png" ?
Currently it just looks for nebula1.png through nebula5.png This could be increased by changing a single line,
const int NUM_NEBULA_TEXTURES = 5;
Obviously this was just written to get something up on the screen, not to make a thoroughly customizable and configurable nebula scripting system. Whenever nebulae get reworked, this will presumably change (though it's not exactly a top priority). I'd suspect we'd have nebula definitions, similar to tech or building defintions, with effects and a graphic, and sizing or shaping rules...
Does it take into account the size of the nebula graphics when figuring out how many a galaxy needs? I.E. would smaller nebula graphics cause the engine to place more in the galaxy and visa versa?
No. And I don't think it should... We'd eventually want to have the in-game size of the nebula be specified in of itself, and have whatever graphic is provided scaled to this size. Or perhaps not even have nebula graphics in that sense, but instead generate the shape / size of the nebula from in-game conditions (related to the arrangement of stars perhaps) and then render a cloud or textured surface to represent it.
...most of those ideas IMHO don't mesh with the game mechanics already laid down. For instance, ships are either in transit along a star-lane (presumably a different dimension) or in a star-system. There's no lurking off to the side hidden in a nebula.
The technobabble mechanics for starlanes hasn't been established, but it could easily be made to allow nebula to affect ships travelling on starlanes through the nebula. Also, systems could be located in nebula, causing the nebula to effect all ships in that system.