Commonly the number of states of MS models depends on one’s judgment (prior knowledge or assumption). For example, one could decide binary MS (two-state MS like financial bear and bull market states, or regular or extreme market states, etc.). After that one initially subjectively makes up the matrixes based on the meaning of states with the observed or generated data (these can be in many possible forms). Finally one takes the prior model to software tools, like Matlab or others. Finally one gets output as a MS model, which is generally different from one's original prior model. This is the Finite HMM method.
Using infinite HMM method one can only have observation data, allow software decide number of states, transition matrix and emission matrixes.
One still needs test data and a test method to evaluate the final model. Please review carefully how to do it with any software tools.
Hope it helps. Good luck. The LZ could have already finished the paper, too bad and too late.