Just because there is a race condition -- doesn't mean that you will get an incorrect answer.
Thread race conditions means that stuff can go wrong -- it doesn't mean that it will go wrong, nor will you notice it.
Regardless, here are some suggestions...
* Don't have your threads track the total. For example, have 10 threads increment 1,000,000 times may or may not get to 10,000,000. However, having 10 threads increment until they get to 10,000,000 will definitely get to 10,000,000.
* Have more threads -- and if possible, run it on a multicore/multiprocessor machine
* Have more iterations -- with short runs, the racers may start and finish before the others start.
* Remove non-race condition code -- don't pause or print any output until the very end.
All in all, I think that suggestion one is likely your main culprit.
Henry