def n_segments(neurites, neurite_type=NeuriteType.all):
return sum(len(s.points) - <NUM_LIT:1><EOL>for s in iter_sections(neurites, neurite_filter=is_type(neurite_type)))<EOL>
Number of segments in a collection of neurites