unsigned long - how to continue counting after 49 days overflow?

In what units? Let's say seconds.

Make another variable, and add to it when 1000+ milliseconds pass. Something like this:

unsigned long seconds = 0;
unsigned long lastSecond = 0;

void setup () {}

void loop ()
  {
  if (millis () - lastSecond >= 1000)
    {
    seconds++;
    lastSecond += 1000;
    }

  // display seconds

  }  // end of loop

That will work for 49710 days. Should be enough before the battery runs out.

I think that will handle overflow correctly. No doubt someone will say if I am wrong.