handle res.locals.rowsCounter in requestHandlers.js