Now, keeping in mind that there is a great variation in the size of layouts, what would be considered an average frieght train? Fifteen cars? Twenty?
There's no such thing as an average. Well, theoretically you could find one, if you had more data than anyone has, but it still wouldn't mean much.
On my old 4x6 layout, train lengths were in the single digits. And that reminds me... Stating train length by number of cars isn't the most useful measure, since car lengths vary. Try thinking of trains based on overall length in actual feet and inches (or metric units - whichever you find it easiest to think in) including engines and caboose. You might be surprised how long they are.
In future, I intend to model N scale, but these principles can be applied to any scale. My principles in layout design are based on my priorities, so take from them what you will.
I set the standard train length for a given layout plan in a roundabout way. I start by deciding what motive power will be typical, then I determine how many cars are needed to look like the train requires that much power. This, of course, depends on how much selective compression you want and can accept. For example, I designed many plans based on this assumption (for spaces I didn't have): Typical power will be 3 older 6-axle engines (such as SD40-2s) or 2 newer 6-axle engines (such as C44-9Ws). The layouts were modern era, so no cabooses. However, this caused a disadvantage. Modern freight cars are longer, so a train of the same measured length looks shorter. I decided that I wanted to be able to handle 21 72' cars or 25+ 50'+ cars behind such a consist, which resulted in 11' overall length. This made me realize how difficult modern mainline modelling is.
Then determine acceptable grades based on what your worst-performing engines can do. For example, I've heard that an Atlas C628 has only about half the pulling power of a Kato SD45. Maybe I find it easy to design this way because the typical amount of selective compression I want is enough to not strain even the weaker models. With the example I was using, I estimate that, even if the older 6-axle engines can only pull 20 cars each on level track, helpers wouldn't be needed until past 2%, maybe at about 2.5%.
My point is, in layout planning, design conservatively.
Incidentally, issues of making length compression seem realistic can create problems. In reality, a single switcher such as an MP15 can move around 100 cars (!) at very low speed - the sort of train that would take a consist like what I used in the example to haul at mainline speeds. However, most N scale switchers can't pull more than 15 cars on level track. Speed doesn't affect the pulling capacity of our models as much as it does real diesels.