Until now, out of the total 10 years you were required to stay in Spain in order to get the nationality, you couldn’t leave the country for more than a total of 6 months.
In the case that, because of your country of origin, you just had to stay 1 or 2 years, you couldn’t leave Spain for more than 3 months in total.
But that has changed now.
You are allowed to leave the country as many times as you want. The only thing you must consider is that you can’t be abroad for more than 6 (or 3, depending on the case) consecutive months.
If you split your exits into smaller chunks of time, there won’t be a problem with surpassing that total amount of 183 or 90 days.