From the phrasing of the question I'm guessing that the person being remembered was himself (or herself) member of a military organisation - as such the number of shots fired will vary according to their rank (but unless you're burying royalty, it will be less than 21). The military SHOULD know the appropriate number. As to whether it would be appropriate for them both to fire a salute, I don't know (but I doubt it) - if "flipping" a coin is inappropriate, perhaps they could fire alternate shots.