Recently, microscopic image processing has received more attention and has shown impressive improvements in biomedicine to enable diagnostic tests for diverse healthcare applications. Different approaches have been suggested in literature in order to automate RBCs and WBCs counting. Most of those studies focused on images filtering and pre-processing to enhance cells segmentation and counting. Meanwhile, artificial intelligence (AI) is also witnessing an increasing proliferation in biomedicine and researchers are investigating its use in real world and healthcare applications through machine learning techniques and neural network computing. In fact, AI proved its efficiency in bioclinical medicine, molecular medicine, and medical imaging especially in pattern recognition and image segmentation. In this research, a novel framework that automatically counts and classifies different blood cells, i.e., RBCs and WBCs, in a given microscopic blood smear image using a combination of convolutional neural network (CNN), transfer learning, and mask R-CNN techniques. The objective is to apply image segmentation techniques in order to locate, predict boundaries, classify, and count RBCs and WBCs in blood smear images. Unlike previous studies which relied on traditional image processing techniques and image segmentation, in this work, we advocate the use of mask R-CNN for not only its efficiency in object detection and classification but also for its performance in instance segmentation. As a result, it can be utilized to detect different cells blood smears and differentiate between overlapped cells and objects belonging to the same class. In this context, we propose the use of Resnet-101 as a backbone for feature pyramid network model and Microsoft common objects in context (MS-COCO) pre-trained model to initiate the neural network model weights. In addition, data augmentation and regulation techniques are applied to enhance the model detection and reduce the counting error. The obtained results reveal a highly detection rate of different blood cells. In addition, unlike other state-of-the-art techniques, our proposed method has the ability to identify overlapped and faded cells.