Carousel - dynamic number of slides

JS:

$('.bxslider').bxSlider({
  minSlides: 3,
  maxSlides: 4,
  slideWidth: 170,
  slideMargin: 10
});

HTML:

<ul class="bxslider">
  <li><img src="/images/170_200/trees.jpg" /></li>
  <li><img src="/images/170_200/tree_root.jpg" /></li>
  <li><img src="/images/170_200/houses.jpg" /></li>
  <li><img src="/images/170_200/hill_road.jpg" /></li>
  <li><img src="/images/170_200/me_trees.jpg" /></li>
  <li><img src="/images/170_200/hill_trees.jpg" /></li>
  <li><img src="/images/170_200/mountain.jpg" /></li>
  <li><img src="/images/170_200/houses.jpg" /></li>
</ul>

This slider always displays no less than three slides (minSlides) and always displays no more than four slides (maxSlides). Therefore when the minSlides number (3) is reached the slides will be scaled down.