Added option in count_defects() to count over whole history.