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)
    # Test for division by 0
    if cw + gw:
        return (w + gw) / (cw + gw)
    # Undefined, not info about column width and gutter or zero division
    return 0