I recently did same kind of work. Even I too was enhancing a plain java program which also processes millions of records at times.
Anyways, Here are some of answers you are looking for.
1) Either declare certain number of thread count in your config file and read from it or you can hardcode a variable with certain number of threads in your program. But declaring in config file makes your life better. even if you want to change in production, that won't be a code change.
See some of my code snippet.
So that is how I handled it. See if this can help you
2) to asnwer your question 2, just join the threads you created and that will make sure that all the threads are done.
Once your control comes after this for loop means all of your threads are done processing.
3) Probably I am not sure how to come up with solution for this one but what do you mean by hung threads? if thread is processing, some thing goes wrong then it should throw some exception and make your decision there what to do with it.
again, for parent and child thread issue should be taken care by join() method.
May be some one else will shed some more light on this.