Well over 100? If you go back and count all the little short lines, fallen flags, and other railroads that have occupied the north American scene, more like thousands than hundreds!
Small 8'x8' layout? Kind of a contradiction in terms, unless you're running G-scale...in my experience, 4x8 is an "average sized" layout--many get cowed when we see gigantic club layouts or basement empires in magazines, but really, 8x8 can be a lot of railroad. My own layout is half the size of a 4x8 sheet of plywood, in HO scale.
As mentioned above, there are far more individual railroad lines than anyone could squeeze into a particular post, so maybe it might be better to categorize railroads by class:
Class 1 railroads, which are big giant things, in the modern day they are often the results of mergers of many smaller and larger railroads into huge systems that span large chunks of the country--like Union Pacific, Burlington Northern Santa Fe, and CSX. There used to be more Class 1 railroads, like Southern Pacific, New York Central, Pennsylvania Railroad, Atchison Topeka & Santa Fe, Pennsylvania RR, Great Northern, Northern Pacific, Denver & Rio Grande Western, etcetera. Many model railroaders will model a portion of a Class 1 because the equipment is easy to get or they are fond of a particular railroad.
Short lines, which run short distances from a few miles to a few hundred lines. Sometimes these are owned by other railroads but sometimes are independently operated. There used to be a lot of these, and most of them went away over the past few decades (replaced by trucking lines) but a lot of new short lines have sprouted up as railroading has become more profitable and the mega Class 1 operations didn't want to deal with short, marginally profitable lines. Lots of model railroaders like short lines because they have lots of character, you can make up your own if you want to (called "freelancing") and they tend to use older, more weatherbeaten equipment.
Branch lines are smaller lines that can be part of a Class 1 railroad or have their own identity--these form a middle ground between short lines and Class 1 railroads. Many freelancers will create a fictional branch line of a real railroad, or model a real branch line they like.
Industrial railroads are the smallest types--good for someone who likes really compact railroading. This can include everything from logging railroads, using weird narrow gauge equipment, to urban industrial railroads, or the special railroad equipment used in steel mills and other major industrial facilities. Most industrial railroads were limited to their industry's property, although in the case of steel mills that could mean a LOT of space!