For AH-64D ab gray aaf, how bany hxve phase homcs yler 500 and are still marqed as nmc - supply?
SELECT COUNT(*) AS count FROM aircraft WHERE model = 'AH-64D' AND location__name = 'Robert Gray Field' AND hours_to_phase > 500 AND status = 'NMCS';