In this paper a rolling horizon approach is applied for simultaneous optimization of the rail freight car fleet size and allocation problem. Developed dynamic model of loaded and empty rail freight car flows explicitly treats state, control and station capacity constraints in presence of various freight car types under the partial substitutability among them. Demands and traveling times are considered as random variables. Proposed approach is applied to a set of test cases and it shown to be successful, ultimately providing a new managerial tool for more effective and efficient planning and analyzing rail freight car fleets.