Now uses again the total number of items when no pop was specified.