Depends. If you equate horses with "real numbers all different from another", than 7 is the best I can get down to. Haven't proved optimality, yet, though.
(But obviously you'll need at least 5 races, so that every horse has been raced at least once.)