A new principle of least-squares estimation is described, which extends the old in allowing the estimation of the number of the parameters along with their values. Just as the old principle, the new one too uses only a sum of squares, which now, however, represent prediction errors rather than fitting errors. In a typical regression problem with independent normal data, the estimates of the number of the parameters, i.e. the number of the regressor functions, are shown to be consistent.