#create the field for the count valuesarcpy.AddField_management(infeature,field_out,"SHORT")

#creating the list with all the values in the field, including duplicateslista=[]cursor1=arcpy.SearchCursor(infeature)for row in cursor1: i=row.getValue(field_in) lista.append(i)del cursor1, row

#updating the count field with the number on occurrences of field_in values#in the previously created listcursor2=arcpy.UpdateCursor(infeature)for row in cursor2: i=row.getValue(field_in) occ=lista.count(i) row.setValue(field_out,occ) cursor2.updateRow(row)del cursor2, rowprint("Done.")

Not a complete solution but might be something to look into. numpy and pandas have much better grouping functions. Challenge is to get the result back into your arcpy.da cursor and update the desired column.