Estimating the number of changepoints in segmented regression models: comparative study and application