I'm going to guess that this line is the incorrect one:
name.(field_names(k,1))(count,1) = data_struct_sorted_unique.(field_names(k,1))(count,1);
If that is not correct, please tell us which line is producing the error.
The problem itself probably comes from the previous line:
name = RouteName_catagories(i,1)
I don't know what RouteName_catagories is, but I'm assuming that it is not a structure class variable, so attempting to call the dot indexing (.fieldname) will not work.
You've probably seen it before, but it is generally considered bad practice to try and dynamically name variables in Matlab, and that it is much simpler, and smoother to use indexing. For your case, instead of trying to name a specific field after each route, just do something like name a field 'name' and then assign it the name value.
Data(i).name = RouteName_catagories(i,1);
Additionally, indexing with structures is most easily accomplished by assigning the index value to the top structure itself, rather than indexing the fields themselves. As a result, getting the information about route 1 is as simple as calling Data(1), which will return a 1x1 structure that contains the name and corresponding data (I'm assuming you attach that).