Merging Trees

Hi,

I'm trying to merge two trees and then cull out branches that have the same numbers in them (0,1 is the same at 1,0 so I only need it appearing once). Any advice? I also need to then compare those culled branches to a list of numbers and count the number of times times a sheet type is used.

Thanks for the help,

Vincent