code: func (c *DialContext) EnsureCounter(db string, collection string, id string) error {
  	s := c.Ref()
  	defer c.UnRef(s)
  
  	err := s.DB(db).C(collection).Insert(bson.M{
  		"_id": id,
  		"seq": 0,
  	})
  	if mgo.IsDup(err) {
  		return nil
  	} else {
  		return err
  	}
  }
docs: // goroutine safe