Latent stochastic blockmodels are flexible statistical models that are widely used in social network analysis. In recent years, efforts have been made to extend these models to temporal dynamic networks, whereby the connections between nodes are observed at a number of different times. In this paper, we propose a new Bayesian framework to characterize the construction of connections. We rely on a Markovian property to describe the evolution of nodes' cluster memberships over time. We recast the problem of clustering the nodes of the network into a model-based context, showing that the integrated completed likelihood can be evaluated analytically for a number of likelihood models. Then, we propose a scalable greedy algorithm to maximize this quantity, thereby estimating both the optimal partition and the ideal number of groups in a single inferential framework. Finally, we propose applications of our methodology to both real and artificial datasets.