index.js - update number of messages