How to count period for naturalisation

Questions concerning how to count the time needed in Switzerland before one is eligible to apply for naturalisation. For instance, if not mistaken one needs to have at least 10 years B or C permit. Under this assumption:

1. Do the months during unemployment period (while receiving RAV) count towards naturalisation?

2. Do the months during unpaid leave (e.g. sabbatical) count towards naturalisation?

Yes

As long as you were resident in Switzerland.

For normal naturalization, you need 10 years residence at least, and at the time of application - and all the way through naturalization - a C permit.

1 and 2 count, as long as you don't deregister from Switzerland, say during your sabbatical.

Of course. I know stay-at-home spouses who have naturalized having never worked a single day in CH. Employment is not a requirement, just residence.