When one tries to express a protein from a synthetic plasmid in E. coli, how many base pairs should there be between stop codon and the transcription terminator site?
In general, there is no need for a spacing between stop codon and terminator. They can be right next to each other.
When transcribed, transcription terminator forms a hairpin-like structure which interacts with the RNA polymerase to stop the transcription. Usually, the upstream sequence will not interact with the terminator and it will be transcribed normally. In a rare case the coding sequence might contain sequences that extend the hairpin and might result in interrupted translation. This can be avoided by doing a thermodynamical inspection of the secondary mRNA structure, but this is usually unnecessary.