def castep_geom_count(dot_castep):
    """Count the number of geom cycles"""
    count = 0
    with open(dot_castep) as fhandle:
        for line in fhandle:
            if 'starting iteration' in line:
                count += 1
    return count