Do comment flags deemed helpful count toward the Deputy and Marshall badge requirements, or is it only question and answer flags that count?
Only the flags for moderator attention are counted for getting the Deputy, and Marshall badges; this, for example, excludes the flags for spam posts.
On a site, I didn't get the Marshall badge, even if my total helpful flags are more than 500; that is because my flags for moderator attention are just 387.
Update: Moderators don't get those badges, and the site I was referring to is the site where I am a moderator. It is not true that only flags for moderator attention are considered for getting those badges.
Yes they do. While can't find any official documentation for this, I can prove it with the help of Yannis who was kind enough to give screenshot of his flag history at http://workplace.stackexchange.com: (source)
And as you can see here, the badge is all his: