The Ombu library, in the Data Analysis aisle, has an article about determining the sample size when each item is either conforming or nonconforming. The article explains the use of the binomial distribution. It also covers the special case of the sample size when based on a confidence level and process nonconformance rate.