def velmodellayers_sdsu(ifile):
    """
    Input a SDSU type velocity model file and return number of layers
    as defined by SDSU. This is designed for use in the SDSU code
    which required the number of layers in a file.
    """
    lincount = 0
    infile = open(ifile, "r")
    for _ in infile:
        lincount = lincount + 1
    infile.close()
    if lincount < 3:
        return 0
    else:
        return lincount-2