Samira Mekki the number of modes to solve in HFSS's eigenmode solver is set in the analysis setup. Under the "general" tab, there is an entry "Number of Modes".
If you're asking for how many modes you should be solving for in your particular simulation -- only you can know that. Start with a small number (e.g., 4), and keep increasing it until you've solved all the modes you want.
There is an infinite number of modes in a resonator, but the number of "useful" modes is limited. Sometimes you may be interested only in a fundameltal mode. If you could provide the details of you study - we might be able to advice. Please, keep in mind that the time, required to calculate higher-order modes, grows very fast with the freqeuncy, while the accuracy suffers - so the practical limit is set by your computer resources.