Used CountDownLatch

Used a CountDownLatch to make sure that the final count is not printed
out until all of the threads have completed their work.
Comments.
Used dedicated countingLocker object for lock.