Begin your query:
  1. Navigate to Analysis, then click on Information library
  2. Click Add an ad-hoc query
  3. Select the Source View of Constituents and click OK (this can also be accomplished through a memberships query, but this method is more direct if you'd like to output the Primary Member Name in your results). 

Add fields to Include records where:
  1. In the left column, expand Member. From the middle column, drag Primary Member to Include Records Where. Set this to be equal to Yes. Your field will appear like this: Member\Primary Member is equal to Yes.
  2. In the left column, highlight Membership beneath where you expanded Member. From the middle column, drag any fields you would like to include in your filters such as Membership Program, Membership Level, or Membership Status. For example: Member\Membership\Status is equal to Active and/or Member\Membership\Membership Program is equal to General Membership. At this point, you can also drag any fields you'd like to see about the memberships in the Results to Results Fields to Display. For example: Member\Membership\Membership ID, Member\Membership\Membership Level, or Member\Membership\No. of Children, etc. 
  3. Next, expand Members beneath Membership. This is looking at the membership record and finding all of the constituents (including the Primary Member) that are linked to the Membership. From the middle column, drag Is dropped to Include Records Where. This will eliminate any members from your count who have since been removed from the membership record. Your field will appear like this: Member\Membership\Members\Is dropped is equal to No. 
  4. (Optional) To find number of members on membership by membership program: From the left column expand the membership programs, then select the Membership program. From the middle, drag Status into Include records where. Set equal to Active.

Add fields to Results fields to display:
  1. Highlight Constituent beneath where we expanded Members in Step 6. From the middle column, drag Lookup ID to Results Fields to display. Your field will appear like this: Member\Membership\Members\Constituent\Lookup ID. 
  2. In Results Fields to display, highlight Member\Membership\Members\Constituent\Lookup ID.  Click the Sigma Sign and select to Count the Lookup IDs as pictured below. This will provide a count of all of the unique constituents listed on a membership record.
  3. (Optional) To see membership status: From the left column expand the membership programs, then select the Membership program. From the middle, drag Status into Results fields to display.
    Image of how to apply count function to Member\Membership\Members\Constituent\Lookup ID
Save your query:
  1. Click Set save options tab
  2. Name your query
  3. Save and Close
Here is an example of what your final query will look like: 
Example of final query for number of members per membership