I suppose this really is really quite simple however i don't have any knowledge about jquery whatsoever. I am using bxslider in each and every publish I publish during my wordpress theme and want the jquery to suggest to several unique id's, not just to work1, but work2, work3 and so forth.

The markup is this:
<ul id="work1">
<li></li>
<li></li>
</ul>

<ul id="work2">
<li></li>
<li></li>
</ul>

...

And also the code:

    <script type="text/javascript">
    jQuery(document).ready(function(){
    jQuery('#work1').after('<div class="work-pager"></div>');
    jQuery('#work1').bxSlider({
    mode: 'horizontal',
    infiniteLoop: false,
    speed: 500,
    pause: 8000,
    auto: false,
    pager: true,
    controls: false,
    pagerSelector: '.work-pager'
     });
    });
    </script>
function findNewId() {
    var i = 0;
    while(1) {
      if($('#work'+i).size()==0) return 'work'+i;
      i++;
    }
}
$('ul').each(function() {
  $(this).attr('id',findNewId());
});

This will have the desired effect. JSFIDDLE