I've done it several ways for "taking attendance" on the muster drills. Back when life jackets were required at the drill, they looked at the back of the life jacket, near the neck, where it had the stateroom number on it. On my last one, where life jackets were not required, I think I either just gave the attendant my stateroom number, or showed my SeaPass card, and the attendant checked it off of the list.
2007 - Majesty of the Seas (Bahamas)
2009 - Enchantment of the Seas (Western Caribbean)
2010 - Freedom of the Seas (Western Caribbean)
2013 - Golden Princess (Alaska, roundtrip from Seattle)