Dimensionality reduction is widely used in modern Neuroscience to process massive neural recordings data. Despite the development of complex non-linear techniques, linear algorithms, in particular Principal Component Analysis (PCA), are still the gold standard. However, there is no consensus on how to estimate the optimal number of latent variables to retain. In this study, we addressed this issue by testing different criteria on simulated data. Parallel analysis and cross validation proved to be the best methods, being largely unaffected by the number of units and the amount of noise. Parallel analysis was quite conservative and tended to underestimate the number of dimensions especially in low-noise regimes, whereas in these conditions cross validation provided slightly better estimates. Both criteria consistently estimate the ground truth when 100+ units were available. As an exemplary application to real data, we estimated the dimensionality of the spiking activity in two macaque parietal areas during different phases of a delayed reaching task. We show that different criteria can lead to different trends in the estimated dimensionality. These apparently contrasting results are reconciled when the implicit definition of dimensionality underlying the different criteria is considered. Our findings suggest that the term ‘dimensionality’ needs to be defined carefully and, more importantly, that the most robust criteria for choosing the number of dimensions should be adopted in future works. To help other researchers with the implementation of such an approach on their data, we provide a simple software package, and we present the results of our simulations through a simple Web based app to guide the choice of latent variables in a variety of new studies.Key pointsParallel analysis and cross-validation are the most effective criteria for principal components retention, with parallel analysis being slightly more conservative in low-noise conditions, but being more robust with larger noise.The size of data matrix as well as the decay rate of the explained variance decreasing curve strongly limit the number of latent components that should be considered.When analyzing real spiking data, the estimated dimensionality depends dramatically on the criterion used, leading to apparently different results. However, these differences stem, in large part, from the implicit definitions of ‘dimensionality’ underlying each criterion.This study emphasizes the need for careful definition of dimensionality in population spiking activity and suggests the use of parallel analysis and cross-validation methods for future research.