Object counting is a popular operation in computer vision. It is also useful for visual inspection. When counting objects for visual inspection count of objects with similar features is calculated. In object counting feature extraction from input image is done and count is calculated by comparing these features values with cutoff values. These cutoff values are statically specified and used for particular application. In this paper an automatic counting method is proposed which requires only tolerance to be specified to calculate count of object. The proposed method calculates cutoff values at runtime and therefore it can be easily applied to different applications. The object count generated by proposed method is useful for visual inspection of input samples. The proposed method has basic four steps as Input image, Preprocessing, Segmentation and Counting. In fourth step 'Counting' cutoff values are calculated to generate final object count. Proposed automatic counting method is tested on two applications and it shows high accuracy. © 2015 IEEE.