In order to count stacked-sheet in real time, a non-contact method based on broadband X-ray absorption spectra (XAS) and long short-term memory (LSTM) network was proposed. Five hundred sheets of standard A4 printing papers (70 g/m2) were taken as experimental samples. The broadband XAS detection equipment was used to scan the papers leading to 500 broadband XAS data, and the data were preprocessed by principal component analysis (PCA). LSTM was built to count stacked papers, and compared with polynomial fitting model(PFM) and artificial neural network (ANN) to verify the difference in prediction accuracy. Mean square error (MSE), Mean absolute error (MAE), Max-error (MAXE) and Coefficient of determination (R2) were selected as evaluation indexes of above models. The experimental results showed that the proposed approach can count stacked-sheet accurately with the MAE was 1.0895 and the prediction time was less than 0.006 second. All the index results of LSTM were better than those of PFM and ANN. Therefore, this study using broadband XAS and LSTM realized real-time stacked-sheet counting, and provided a new idea for thickness measurement field.