Several sensory nerves connect directly to the cerebral ganglion; there are sensory and motor nerve cells connected to the ventral nerve cord ganglia in each segment.Leeches have between two and ten pigment spot ocelli, arranged in pairs towards the front of the body. There are also sensory papillae arranged in a lateral row in one annulation of each segment. Each papilla contains many sensory cells. Some rhynchobdellids have the ability to change colour dramatically by moving pigment in chromatophore cells; this process is under the control of the nervous system but its function is unclear as the change in hue seems unrelated to the colour of the surroundings.Leeches can detect touch, vibration, movement of nearby objects, and chemicals secreted by their hosts; freshwater leeches crawl or swim towards a potential host standing in their pond within a few seconds. Species that feed on warm-blooded hosts move towards warmer objects. Many leeches avoid light, though some blood feeders move towards light when they are ready to feed, presumably increasing the chances of finding a host. Gas exchange
Leeches live in damp surroundings and in general respire through their body wall. The exception to this is in the Piscicolidae, where branching or leaf-like lateral outgrowths from the body wall form gills. Some rhynchobdellid leeches have an extracellular haemoglobin pigment, but this only provides for about half of the leechs oxygen transportation needs, the rest occurring by diffusion.
Almost seven hundred species of leech are currently recognised, of which some hundred are marine, ninety terrestrial and the remainder freshwater. Leeches have been used in medicine from ancient times until the 19th century to draw blood from patients. In modern times, leeches find medical use in treatment of joint diseases such as epicondylitis and osteoarthritis, extremity vein diseases, and in microsurgery, while hirudin is used as an anticoagulant drug to treat blood-clotting disorders. Diversity and phylogeny
Some 680 species of leech have been described, of which around 100 are marine, 480 freshwater and the remainder terrestrial. Among Euhirudinea, the true leeches, the smallest is about 1 cm (1⁄2 in) long, and the largest is the giant Amazonian leech, Haementeria ghilianii, which can reach 30 cm (12 in). Except for Antarctica, leeches are found throughout the world but are at their most abundant in temperate lakes and ponds in the northern hemisphere. The majority of freshwater leeches are found in the shallow, vegetated areas on the edges of ponds, lakes and slow-moving streams; very few species tolerate fast-flowing water. In their preferred habitats, they may occur in very high densities; in a favourable environment with water high in organic pollutants, over 10,000 individuals were recorded per square metre (over 930 per square foot) under rocks in Illinois. Some species aestivate during droughts, burying themselves in the sediment, and can lose up to 90% of their bodyweight and still survive.