The paper deals with the particle filter in state estimation of a discrete-time nonlinear non-Gaussian system. The goal of the paper is to design a sample size adaptation technique to guarantee a quality of a filtering estimate produced by the particle filter which is an approximation of the true filtering estimate. The quality is given by a difference between the approximate filtering estimate and the true filtering estimate. The estimate may be a point estimate or a probability density function estimate. The proposed technique adapts the sample size to keep the difference within pre-specified bounds with a pre-specified probability. The particle filter with the proposed sample size adaptation technique is illustrated in a numerical example.