Your best bet is going to be to find an Offical Railway Equipment Register (ORER) for the time you are interested in. Every piece of interchangeable rolling stock is listed including AAR designation and dimensions for every railroad in existence at the time of issue. Now issued quarterly railroads throw them away when they get the new one. The NMRA published a version from the 1950’s at one point and they are a plethora of information. For each railroad all interchange points are also listed and currently the number of locomotives also.
This database is HUGE. It covers freight car design, history and rosters from between about 1890-1960, and includes LOTS of hard data by car type and road name, and includes hundreds of photos and diagrams. While it’s not all-inclusive, it does grow weekly and gets better with age.
And as with anything this useful, it’s not free. A monthly subscription will run $8, or a year $60 (I just renewed for a year; I’ve been subscribing for three years now). But you definitely get what you pay for! For the price of a couple of magazines a month, you end up with access to a whole bookshelf full of data.