Your presence in other European countries has no bearing on your status in the UK. You can return to the UK immediately after you leave.
US citizens are normally given six months on entry. There is no rule about how much time you can spend in the UK in aggregate, only that you must leave before six months have elapsed (or, if you are admitted for a shorter time, you must leave before the end of that shorter period, of course).
You can't, however, stay in the UK indefinitely by leaving for a short time just before your period expires and then returning for another several months. If you do that, the officer will refuse entry. This is a little problematic because there's no strict rule you can point to to say that you should or should not be allowed in. You just have to convince the immigration officer each time that you are a "genuine visitor." Another way of putting this is that you are not attempting to live in the UK through successive or frequent visits.
If you are returning more than six months after your last entry, and you stayed in the UK for three months, then you are unlikely to be suspected of trying to live in the UK through successive or frequent visits.