There is no official answer to your question.
Technically when you leave the US and travel to a country other than Mexico or Canada (or some locations in the Caribbean) your current VWP entry will end, and when you re-enter a period of time later you will be given a new VWP, with another 90 days of validity.
However, as with any time that you are entering a foreign country, it is up to the discretion of the the immigration officers as to whether they will let you into the country, and they can ask you any questions they wish in order to determine your intent.
If, in the opinion of the immigration officers you are either intending to stay over 90 days, and/or if they believe that you have taken a short trip out of the country simply as a "visa run" in order to extend your VWP status within the US, then they will almost certainly deny you entry when you try and re-enter the second time.
Even if they don't see this as a "visa run", I would expect them to question you over what you are doing in the US for 6 months, and how you intend to financially support yourself there without working - which is not allowed on a VWP visa.
The recommended way to say for 6 months would be to apply for a B2 Tourist Visa, which will allow you to stay in the country for up to 6 months.