FLUKA simulations of the response of tissue-equivalent proportional counters to ion beams for applications in hadron therapy and space.