Very specific question regaurding travels, please help!

To whom it may concern,

Hello! My name is Sean Stone, I am writing to this forum in hopes that I can find an answer, or at least be pointed in the right direction with my upcoming travels to Europe. I would like to state that I have been doing much research on this issue and just cannot find an appropriate answer to my specific situation.
    In august of this year I am flying from the United States to Dublin with my girlfriend to start our journey. We are living our dreams of backpacking and traveling throughout Europe. Now I understand the time frames of my allowed stay without a visa; If I am in the United Kingdom I am able to stay for up to 6 months and I am allowed 90 days in the Schengen Area. With that said, here is my question:
    Once we land in Dublin, the date will be August 31st, 2012. We will spend a couple weeks in Ireland and then make our way into England to visit with some relatives for another week or so. After that we will head into the Schengen Area for our allowed 90 days stay. Once those 90 days are almost up, we would like to travel back to England in hopes that we can finish out our 2 remaining months that would equal 6 months in Europe total. Or are we allowed 5 months stay since technically we stayed in the UK for only a month and the other 3 months which were in the Schengen Area?
Does this logic make sense? I am just trying to plan ahead and cover all problems that might occur with immigration laws, etc. If there is any way that you can help us out with any information, it would be greatly appreciated! Thank you for taking the time to read this.
                               
                                    Sincerely,                                 
Sean Stone
                                     [email protected]

Hi, i'm British myself but i'm no expert on immigration law either haha, but perhaps the UK's Foreign Office website might help?
http://www.fco.gov.uk/en/

Sorry for lack of info, there may be someone on the British foreign office website that you could email with your enquiry!