Here is a code snippet that will create a group in the root of the current database and replicate documents having more than two tags to it.
tell application id "DNtp"
tell current database
set allTagged to search "item:tagged" in root of it
if allTagged is not {} then
set tempLocation to create location "/More than 2 tags"
with timeout of 3000 seconds
repeat with theRecord in allTagged
if (count tags of theRecord) > 2 then replicate record theRecord to tempLocation
end repeat
end timeout
end if
end tell
end tell
This isolates the documents so you can remove extraneous tags on them in the replicants group. The change will affect all instances of the documents. When you’re done you can delete the replicants in the group. This will leave the other instances intact.
And I wouldn’t run this on a database using group tags, as those tags are automatically applied by inheriting their parent groups’ name.