You don't have to go through customs when you transfer but you do have to go through a security check point when you change terminals. I think our flight from BOS arrived at terminal 4 and we had to change to terminal 3 for the BA flight (it might have been the other way around - I can't remember). There was no line at the check point when we came in from BOS. On the return from CPH we waited in line for 20 - 30 min.
Kathy