You should be able to use the Dissolve tool (no need for ArcPy) which:
Aggregates features based on specified attributes.
In your case just use a single attribute (TotalCT
).
It looks like this will result in a multipart feature so, if you need to get the parts that do not touch as separate features, try running Multipart to Singlepart as a second step:
Creates a feature class containing singlepart features generated by
separating multipart input features.
Alternatively, a one step process that could do this is described in a comment by @MichaelMiles-Stimson (but he has made a later comment questioning the accuracy of that alternative):
Dissolve has a switch for 'Multipart' and 'Unsplit Lines'
http://help.arcgis.com/EN/arcgisdesktop/10.0/help/index.html#//00170000005n000000 if you
select 'no multipart' and 'unsplit lines' it should leave the
unattached lines exactly as they are, only merging/dissolving lines
that share a common endpoint - no need to run multipart to single.