LPS-48992 Use atomicInteger as a counter