In order to solve the problems of dense distribution, limited feature extraction ability, and false detection in the field of tea grading recognition, a YOLOv8n-SSMC tea grading and counting recognition model was proposed in this study. Firstly, the SPD-Conv module was embedded into the backbone of the network model to enhance the deep feature extraction ability of the target. Secondly, the Super-Token Vision Transformer was integrated to reduce the attention of the model to redundant information, thus improving the perception ability of tea. Subsequently, the positioning loss function was improved to MPDIoU, which accelerated the convergence speed of the model, optimized the performance of the model. Finally, the classification positioning counting function was added to achieve the purpose of classification counting. The experimental results showed that the precision, recall and average precision improved by 17.6%, 19.3%, and 18.7% respectively. The average precision of single bud, one bud and one leaf, and one bud and two leaves were 88.5%, 89.5% and 89.1% respectively. In this study, the YOLOv8n-SSMC recognition model demonstrated strong robustness and proved suitable for tea grading edge picking equipment, laying a solid foundation for the realization of mechanized tea industry.