Returns the number of distinct knots.
If consecutive knots are within the knot equality tolerance, the knots are considered identical, and their multiplicities combined.