From the Enduro perspective (12, 24 hr etc) we have worked on not dropping below 35m between riders as an average track spacing. See attached graph. 2006 and 2009 are remembered as particularly "crowded" years.
Riders-on-track is just that. So, if you have 1000 riders in an event with teams of 4, you only have 250 on track, which would mean a 10Km course for a 40m average track spacing.
Its not really relevant for XCO type races, because when people are lapped they are generally pulled off the course.
I try aim for about 45m these days - you don't want to make it too big or riders won't see many other riders out there. However, the more single track you have, the larger you might want to go because of reduced passing opportunities.