If you buy in Spain you can buy as a non-resident and are therefore not subject to taxation laws.
If retired and above legal retirement age then a gestor would be able to tell you what benefits this may give you with regards to heathcare etc.
I have always thought that staying under 183 days a year in a one country is a good idea, I think you would be wiser to ensure your rental contracts are exactly that too otherwise it could be used against you if any of the authorities wanted to be awkward, and somewhere down the line Im sure you would have to prove entry and exit dates, alternatively buy a boat large enough to live on and then your home moves with you.
Actually Inez mentions a good point in the strategy that I failed to mention in my haste — a nice big boat (if you can afford it) is the away to go in Med Europe — South of France, Majorca and Algarve all beckon.
Inez, you have rumbled my tactics !