Default Question about flash counter/unrooting and warranty?

Hi, sorry for these noob questions.

I have to send my device back for warranty and I just learned about the flash counter. So used triangle away to set the number back to zero but my phone's device status still says "custom." I read somewhere that a factory reset would be able to change that back to normal. I will try that soon, but I haven't unrooted yet. I was going to flash a stock rom (also read that that would change device status back to "normal") after changing the flash counter number, but wouldn't that change it to 1? How do I unroot without triggering the flash counter? Thanks in advance!