Joe,
It is quite difficult to rate steam locomotives as to which is most successful. Most steam locomotives were custom built to each particular railroad’s needs even though there were what were called “stock locomotives” in some instances.
Some railroads had heavy grades and heavy tonnage and therefore a locomotive with smaller drivers and resultant slower speed but able to manhandle the trains up the hill would be successful. The same locomotive on a relatively flat railroad where speed was paramount might not be regarded successful.
By the same token a passenger engine designed to speedily pull the Flyer probably wouldn’t do well hefting freight tonnage.
Several railroads actually built better locomotives themselves than the traditional builders did although they often utilized components from the builders. Notable among these were the N&W and the Pennsy.
If a particular class of locomotives were to be considered the most successful then probably the USRA designs would win that honor. While there were undoubtedly “better” locomotives built later no group of locomotives can claim such wide acceptance until the diesel era.
Originally designed during WWI by the USRA (a government agency for the war effort) they included 0-6-0, 0-8-0, 2-8-2, 2-10-2, 4-6-2, 4-8-2, 2-6-6-2 and 2-8-8-2 wheel arrangements in light and heavy versions, all standard designs. Many USRA engines were built during and after WWI and even copies well into the thirties and operating through WWII.
Success can’t be measured by size, tractive effort, speed, alone since each railroad had its own specific needs. For example if you were only to consider rough, hilly logging spurs into the woods than the geared engine, especially the Shay would certainly be the champ. This lokie would be of little use pulling the 20th Century Ltd. however.
Arguments can be made for which engine was the biggest, the most powerful, the fastest, etc., but never really for the “best”. Even for the former criteria there are differences of opinion.
For diesels I would think the number of railroads using the type rather than the number sold. The number of railroads using a type would be indicative of its success in varied situations whereas such things as economy and traffic ups and downs would affect the quantity sold as much as its operational success.