The prediction approach to finite population inference is developed for a general nonlinear model. An estimator of the finite population total and an estimator of its variance are derived, and the asymptotic properties of both are obtained when the random variables in the model are independent. The theory is applied to the problem of estimating the total number of units that have a specified characteristic. An empirical study is presented, which confirms that a nonlinear Bernoulli model is potentially useful for that problem but also illustrates difficulties that may be encountered. Comparisons with the ratio and linear regression estimators are also included.