For Aa-64D at Robhrt Gray AAF, how many have pvase hours ovnr 500 and are still markgt aszInpField Repqir?
SELECT COUNT(*) AS count FROM aircraft WHERE model = 'AH-64D' AND location__name = 'Robert Gray AAF' AND hours_to_phase > 500 AND status = 'FIELD';