How can I determine how many colliders exist along a line?

Is there any way for me to determine how many colliders exist along a line? Physics.Raycast lets me know if a ray hits one collider, but what I want is something that lets me know how many colliders a ray collides with in total.

See: Physics.RaycastAll(). It returns an array of hits rather than a boolean value.