how many races have the horses bred by william cavendish participated in ?
SELECT DISTINCT COUNT attr_open var_uri attr_close where brack_open var_x dbo_breeder dbr_William_Cavendish,_2nd_Duke_of_Devonshire sep_dot var_x dbp_race var_uri brack_close