Counting word in message how to save

Here’s my code and my question is how can i change it to save numbers of counting?

After restart script it always back to 0

I don’t want change manually var test = 0;

const tmi = require('tmi.js'),
    { channel, username, password } = require('./settings.json');

const options = {
    options: { debug: true },
    connection: {
        reconnect: true,
        secure: true
    },
    identity : {
        username,
        password
    },
    channels: [
                '#qwerty',
    ]
};

var test = 0;

const client = new tmi.Client(options);
client.connect().catch(console.error);

client.on('connected', () => {
    client.say(channel, `Here`);
});

client.on('message', (channel, user, message, self) => {
    if(self) return;

        if(user.username == 'zzz' && message.includes('SSS')) {
            test++;
        }
        if(message == ('test')) {
            client.say(channel, 'xxx ' + test.toLocaleString());
        }
    });