for how many pms did the politician work , whose successor was peter thomas ?
SELECT DISTINCT COUNT attr_open var_uri attr_close where brack_open dbr_Peter_Thomas,_Baron_Thomas_of_Gwydir dbo_successor var_x sep_dot var_x dbp_primeminister var_uri sep_dot var_x a dbo_OfficeHolder brack_close