As others have pointed, there are some independent factors to consider when the bike is to be sold (or bought). I think mileage is not the most important since, as mikes has written, you can ride a lot while taking care, or can almost never ride while the bike rots in a basement.
Now for condition, I think painting is a very valued item in a bike, not only for it's direct show factor, but also because, usually, bikes with lots of scratches possibly had other types of misuse.
Another important factor, although not so visible one, is the stress to which the parts have been submitted. For a rigid mountainbike, for exemple, use in harsh trails or roads create stresses that might induce fatigue o frame, fork, handlebars and crank arms (mostly), overload bearings, and stress rims and spokes. Again, by visual analysis one can have a rough measure of the "stress condition" of the bike. In the other hand, road bikes usually get less dirt, but can get a lot of abuse, for exemple, by riding rough roads with superinflated tires.
At last, one almost invisible factor is "has the bike suffered a crash?". A violent one could induce micro-cracks that would only show negative results much time later, even if there is no visible damage.
As to your question, I think the trainer miles souldn't count, since they're mileage on very controlled conditions, and could only affect drivetrain, being mostly useful for maintainence schedule, and for personal training purposes.
Hope it helps.