lastCls fix #23

Only set $totalCount if $limit is not 0 (defaults to 0)