Just a little point while I read the code... The condition in that for loop doesn't look right. It's quite possible to get maxHeads heads so that entry in the counts array should also be initialised to zero.

Eg, suppose the user wanted ten flips per trial. In that case you have to have space to record eleven possible outcomes for a trial: 0,1,2,3,4,5,6,7,8,9,10 heads.

For set s you obtain the number of heads, sum. But shouldn't you do something with sum once you have calculated it? Hint: yes you must, otherwise you have no data to send to the histogram in step 5.

[Edit]

Also note that your counts array entries which you made zero, stay zero because you never change them. This explains the problem you started the thread with (the zero probabilities.) ANd it suggests what you might do with sum once you have calculated it.