Alternated counting on 2 threads