Are you trying to calculate the mileage of the different street types based on the directions text? If so, here are two alternative, easier/better ways to calculate your mileage.
1. Use the Copy Traversed Source Features tool after solving your route. This tool will output a feature class of the network edges (the individual street segments) that were traversed by the route. From that information, you can calculate the number of miles of each type of street that was used.
2. You can create some additional cost attributes on your network dataset and then "accumulate" these attributes along with solving the route. So, suppose you have two road classes, State and Local. Create two cost attributes, "StateMiles" and "LocalMiles". For "StateMiles", configure the evaluators such that the attribute gives you the road length for all state roads and 0 for all other roads. Do a similar thing for "LocalMiles". Then, when you solve your route, use the Accumulate Attributes section to accumulate StateMiles and LocalMiles. When the route solve is done, the attribute table should show you Total_StateMiles and Total_LocalMiles, which is the total number of miles of each of those road classes that was traversed. Please ask further questions about this if you are uncertain of how to create cost attributes and configure evaluators.