Counts number in a thread
Counting numbers