def w2cw(w, e):
    """Transform from *w* value to column *w* count value, using the
    *e.css('cw')* (column width) as column measure."""
    gw = e.gw
    cw = e.css('cw', 0)
    if cw + gw:
        return (w + gw) / (cw + gw)
    return 0
