 
   watchScope: ->
     @scope.$watch('pagecount', (tits) =>
+      @options.noCount = @scope.pagecount == null or @scope.pagecount == false or @scope.pagecount == undefined
       @options.pageCount = Math.ceil(@scope.pagecount / @options.pageSize)
       @getOptions()
       @gatherElements()

    )
    @scope.$watch('pagesize', (tits) =>
      @options.pageSize = @scope.pagesize || 10
      @getOptions()
      @gatherElements()
      @updatePager()
    )
    @scope.$watch('nocount', (tits) =>
      @getOptions()
      @gatherElements()
      @updatePager()

    @watchScope()

  getOptions: ->
    @options.noCount = @scope.pagecount == null or @scope.pagecount == false or @scope.pagecount == undefined
    @options.visiblePageCount = if @options.noCount then 1 else @scope.visiblepagecount || 10
    @options.pageSize = @scope.pagesize || 10
    @options.pageCount = if @scope.pagecount? then Math.ceil(@scope.pagecount / @options.pageSize) else null
