Perron and Yabu (2009a) consider the problem of testing for a break occurring at an unknown date in the trend function of a univariate time series when the noise component can be either stationary or integrated. This article extends their work by proposing a sequential test that allows one to test the null hypothesis of, say, l breaks versus the alternative hypothesis of (l + 1) breaks. The test enables consistent estimation of the number of breaks. In both stationary and integrated cases, it is shown that asymptotic critical values can be obtained from the relevant quantiles of the limit distribution of the test for a single break. Monte Carlo simulations suggest that the procedure works well in finite samples.