How to get total slides count

How do i get the total slides count of ion-slide-box on page load ? it seems, from what i have tried that i can only get slides count after the page is loaded.

Well if the slides are from ng-repeat, you can use .length

$scope.slides = [ 
  // Some dynamic slides here
];
console.log($scope.slides.length());

thanks, i’ll try that