bick,
It is my understanding that there are several acceptance criteria on this subject.
For acceptance of new construction, I have seen a minumum of three threads and a maximum of five threads "showing above the nut.
For emergency repairs, ourages etc. I would accept anything above "flush with the top of nut"
I do not belive any piping of pressure vessel code has rules about this
-MJC