Cycle2: How to get the total slide count in the jquery script on the click function?

Cycle2: How to get the total slide count in the jquery script on the click function?

Hi, On the click event i want to get the total number of slides from the cycle2 plugin.
  1.  $('#cycle-2 .cycle-slide').click(function(e, opts){ 
  2.  var index = $('#cycle-2').data('cycle.API').getSlideIndex(this); 
  3. });

                   Igot the current index, but i want the slide count in the #cycle-2 click function. mentioned above.  

Any help?? thanks in advance..