princeofwands's rack is a great idea, but when I printed it, I found the fit wasn't that great. Each train's riser is a little too wide so the train "snaps" on -- maybe intentional, but I found it didn't work that well, and sometimes made them hard to take off. Worse yet, the peaks are all triangular and the top is so thin it breaks.
My remix is the same idea, but each riser is a simple rectangle that's large enough to hold the trains in a grid layout (making it easier to count them) but each one simply rests on it, no snapping on.
You'll probably have to file it pretty clean to get the trains to sit right, unless your 3D printer is tuned a lot better than mine is.