Convolutional Neural Networks (CNNs) and Transformers based wheat ear counting methods suffer from difficulty in modeling long-range dependencies, low computational efficiency, and frequent false dense positives or false negatives. To address these issues, a wheat ear counting method named PCLMamba was proposed. This network is a lightweight Mamba network based on segmentation guidance and frequency domain enhancement. First, Grouping Directional Mamba Model (GDMM) was introduced to process image sequences in groups and send them to selective scanning in different orders in a parallel way, thereby capturing long-range dependencies efficiently in a lightweight way. Second, the local features and globally scanned features were fused via a Channel Attention Fusion Module (CAFM). Finally, to solve the problems of dense false positives and negatives, a Segmentation module (Segmenter) was designed to supply prior knowledge, to suppress the background and enhance the foreground. Besides, a Frequency Spatial Enhancement (FSE) module was designed to enhance intermediate features in both spatial and frequency domains, thereby further boosting counting accuracy. Experimental results show that the Mean Absolute Errors (MAEs) of PCLMamba on the MTC, WED, and SHC datasets are 4.4, 4.2, and 15.4, respectively, and the Root Mean Square Errors (RMSEs) are 7.7, 5.3, and 18.3, respectively. On the WED dataset, compared with CountMamba, the MAE and RMSE are reduced by 20.8% and 18.5%, respectively; on the MTC dataset, compared with TasselNet, which has a similar number of parameters, the MAE and RMSE are reduced by 33.3% and 22.2%, respectively. PCLMamba improves the accuracy of wheat ear counting with a relatively small number of parameters, providing a feasible lightweight path for applying state-space models to dense crop counting and offering technical support for automatic field wheat ear counting in smart agriculture.