code: func (c *PercentageTask) Count(n uint64) (new uint64) {
  	if new = atomic.AddUint64(&c.n, n); new > c.total {
  		panic("tasklog: counted too many items")
  	}
  
  	var percentage float64
  	if c.total == 0 {
  		percentage = 100
  	} else {
  		percentage = 100 * float64(new) / float64(c.total)
  	}
  
  	c.ch <- &Update{
  		S: fmt.Sprintf("%s: %3.f%% (%d/%d)",
  			c.msg, math.Floor(percentage), new, c.total),
  		At: time.Now(),
  	}
  
  	if new >= c.total {
  		close(c.ch)
  	}
  
  	return new
  }
docs: // Count indicates that work has been completed against "n" number of elements,
  // marking the task as complete if the total "n" given to all invocations of
  // this method is equal to total.
  //
  // Count returns the new total number of (atomically managed) elements that have
  // been completed.