Estimating the number of mean shifts under long memory