We present a novel method for cell counting using bright field focus stacks. Our method is based on the use of supervised learning and out-of-focus appearance of cells. Logistic regression was used for classification with intensity values of 25 focal planes as features. Binary erosion with a large circular structuring element was applied as post-processing step. With this simple method we obtained mean F\-score of 0.87 for cell counting with 12 test images, including images of extremely dense populations. The most important features were obtained from out-of-focus images. Thus, we conclude that using several focal planes provides valuable intensity information for cell counting from bright field microscopy.