code: func (r *Release) Count(db *sql.DB) (int, error) {
  	tx, err := db.Begin()
  	if err != nil {
  		return 0, err
  	}
  	defer tx.Rollback()
  
  	err = r.Select(tx)
  	if err != nil {
  		if err == sql.ErrNoRows {
  			err = errors.New("model/certdb: release doesn't exist")
  		}
  		return 0, err
  	}
  
  	var count int
  	q := fmt.Sprintf("SELECT count(*) FROM %ss WHERE release = ?", r.table())
  	row := tx.QueryRow(q, r.Version)
  	err = row.Scan(&count)
  	if err == nil {
  		err = tx.Commit()
  	}
  	return count, err
  }
docs: // Count requires the Release to be Selectable, and will return the
  // number of certificates in the release.