Delete Junctions with Edge
cEdgeFeatCount.cls

' Copyright 2008 ESRI
' 
' All rights reserved under the copyright laws of the United States
' and applicable international laws, treaties, and conventions.
' 
' You may freely redistribute and use this sample code, with or
' without modification, provided you include the original copyright
' notice and use restrictions.
' 
' See use restrictions at <your ArcGIS install location>/developerkit/userestrictions.txt.
' 




Option Explicit
'This class module returns the number of Edfe features whihc are connected to a Simple Junction Feature
'Unlike the EdgeFEatureCount method, it does not count the elements in a Complex Edge which are connected
'to a simple junction feature

Public Function EdgeFeatCount(pSJF As ISimpleJunctionFeature) As Long
    
    Dim pRow1 As esriGeoDatabase.IRow
    Dim pRow2 As esriGeoDatabase.IRow
    Dim lNewCount As Long
    Dim lOldCount As Long
    Dim i, j As Integer
    
    lOldCount = pSJF.EdgeFeatureCount
    lNewCount = lOldCount
    
    'Cycle through the set of connected edges and determine if any are elements of the same feature
    For i = 0 To lOldCount - 2
        For j = i + 1 To lOldCount - 1
            Set pRow1 = pSJF.EdgeFeature(i)
            Set pRow2 = pSJF.EdgeFeature(j)
            If pRow1.OID = pRow2.OID Then lNewCount = lNewCount - 1
        Next
    Next
    EdgeFeatCount = lNewCount
End Function