writing into a counter list for main page to read