  This paper proposes a piecewise autoregression for general integer-valued
time series. The conditional mean of the process depends on a parameter which
is piecewise constant over time. We derive an inference procedure based on a
penalized contrast that is constructed from the Poisson quasi-maximum
likelihood of the model. The consistency of the proposed estimator is
established. From practical applications, we derive a data-driven procedure
based on the slope heuristic to calibrate the penalty term of the contrast; and
the implementation is carried out through the dynamic programming algorithm,
which leads to a procedure of $\mathcal{O}(n^2)$ time complexity. Some
simulation results are provided, as well as the applications to the US
recession data and the number of trades in the stock of Technofirst.
