def calc_featnum(model_path):
    """Calcualte the non zero feature number of vw model"""

    with open(model_path, 'r') as rfh:
        lines = rfh.readlines()

    feat_num = float(len(lines) - 11)
    if feat_num < 0:
        feat_num = 0

    return feat_num