Data-Driven Learning of the Number of States in Multi-State Autoregressive Models