There is only one way to efficiently do this that I know of. Load the replica database fields into a dictionary using a searchcursor with the GlobalID as the dictionary key, then loop through a searchcursor on the origin database and attempt to retrieve the GlobalID dictionary key that matches each record. Set up four counters: count, added, deleted, and changed to represent what is different going from the original to the replica. Then compare each item. Items in the original not found in the dictionary are being added. The deleted items will equal the total count of the replica minus (the count of the original minus the counted added items). Changed items will be detected on each matched record by comparing each field value (except ObjectID) until a change is detected. A change will be correctly detected even if all attribute values are the same and the only difference is found in the Shape field of the two matching features.
The code below works provide all fields and field names match in the replica and original and that the GlobalID field is named either "GlobalID" or "GUID". The code has been tested for the commented replicaFC and originalFC path assignments, but not the source_sde and target_sde connection path assignments you are using. In my test a replica feature class with 38,127 features was compared to an origin feature class with 38,126 features and correctly identified that there was 1 added feature in the original, 2 deleted features in the replica, and 1 changed feature with a change only to its shape. The comparison test took just over 24 seconds to complete.
import datetime
from time import strftime
startTime = datetime.datetime.now()
print "Start script: " + startTime.strftime("%Y-%m-%d %H:%M:%S")
import arcpy
# replicaFC = r"C:\Users\OWNER\Documents\ArcGIS\Centerline_Edit.gdb\CENTERLINE_ROUTES_1"
replicaFC = source_sde + r"\replica_name"
fields = arcpy.ListFields(replicaFC)
replicaFieldsList = []
for field in fields:
if field.name in ["GlobalID", "GUID"]:
replicaFieldsList.insert(0, field.name)
print 'Key field is "' + field.name + '"'
elif not field.type in ["OID"]:
replicaFieldsList.append(field.name)
print ' '
print 'Comparing fields: ' + str(replicaFieldsList)
# Use list comprehension to build a dictionary from a da SearchCursor
valueDict = {r[0]:(r[1:]) for r in arcpy.da.SearchCursor(replicaFC, replicaFieldsList)}
currentTime = datetime.datetime.now()
elapsedTime = currentTime - startTime
print ' '
print "Dictionary created: " + currentTime.strftime("%Y-%m-%d %H:%M:%S")
print 'Total Time Elapsed: ' + str(elapsedTime)
print ' '
# originalFC = r"C:\Users\OWNER\Documents\ArcGIS\Centerline_Edit.gdb\CENTERLINE_ROUTES"
originalFC = target_sde + r"\orignal_name"
originalFieldsList = replicaFieldsList
count = 0
added = 0
deleted = 0
changed = 0
with arcpy.da.SearchCursor(originalFC, originalFieldsList) as originalRows:
for originalRow in originalRows:
count += 1
# store the Join value of the row being originald in a keyValue variable
keyValue = originalRow[0]
# verify that the keyValue is in the Dictionary
if not keyValue in valueDict:
added += 1
print(str(keyValue) + ' was Added')
else:
for n in range (1,len(replicaFieldsList)):
if originalRow[n] != valueDict[keyValue][n-1]:
changed += 1
print(str(keyValue) + ' was Changed in field "' + replicaFieldsList[n] + '"')
break
deleted = len(valueDict) - (count - added)
print ' '
print('Added to Original = {0}; Deleted from Replica = {1}; Changed = {2}; Replica Count: {3}; Original Count: {4}'.format(added, deleted, changed, len(valueDict), count))
del valueDict
currentTime = datetime.datetime.now()
elapsedTime = currentTime - startTime
print ' '
print "Finished script: " + currentTime.strftime("%Y-%m-%d %H:%M:%S")
print 'Total Time Elapsed: ' + str(elapsedTime)
See my blog post on Turbo Charging Data Manipulation with Python Cursors and Dictionaries for other ways to do data transfers and summaries using this technique.