count only visible list items

count only visible list items. this helps to set the width of the visible items when hiding some list items based on document width. (for example using twitter bootstrap hidden/visible classes)