API GetNumGuildMembers

Returns the number of guild members. numTotalGuildMembers,numOnlineGuildMembers = GetNumGuildMembers;

Returns

 * numTotalGuildMembers : Integer - Total number of players in the Guild, or 0 if not in a guild.
 * numOnlineGuildMembers : Integer - Number of players currently online in Guild, or 0 if not in a guild.

Example
local numTotal, numOnline = GetNumGuildMembers; DEFAULT_CHAT_FRAME:AddMessage(numTotal .. " guild members: " .. numOnline .. " online, " .. (numTotal - numOnline) .. " offline.");

Result
Displays the number of people online, offline, and the total headcount of your guild in the default chat frame.