You have two options to generate this number depending on the data you need for your report.

Option 1: Program Query 
You should use a program query to calculate the number of events your organization offered if you want to include any program or program event regardless of whether or not tickets were sold to the program/event. 
  1. Click Add a new ad-hoc query 
  2. Select the source view of Program Query and click OK
  3. From the left column, highlight Program Events. In the middle column, drag Start Date to Include Records where. Set this to be equal to the time frame you're looking for. For example: if you want to calculate all of the programs that occurred between two dates, your field would look like this: Program Events\Start date is between X and Y
  4. Next, add the fields you need in your report to Results Fields to Display. Here are a few suggestions:
    1. Highlight Program Query in the left column. From the middle column, drag Category to Results fields to display to show program category (for example: tours, family programs, education programs, camps, classes). 
    2. To show Program Event Name or Date, in the left column, highlight Program Events. From the middle column, drag Name and/or Start Date and/or Start Time and/or Capacity to Results Fields to Display. If you'd like to summarize how many events in each program were offered this year, you can also apply a Count function to either of these fields.
      • Note: The capacity field will provide the overall capacity for the event. If you are looking to see the number of tickets sold to the event, we will use a Sales Order Query as depicted in Option 2.
    3. To Show the Program Event Location, expand Program Events and select Location. From the middle column drag Name to Results fields to display
  5. Here is an Example of a finished query:
User-added image

Option 2: Use a Sales Order Query 
You should use a sales order query if you want to include any program or program event only if tickets were sold to that program. You can also use a sales order query to report on how many tickets were sold to each program as well. 
  1. Go to Analysis > Information Library 
  2. Click Add an ad-hoc query 
  3. Select the source view of Sales Orders and click OK
  4. From the left column, expand Sales Order Item, expand Sales Order Item Ticket, and highlight Program Events. From the middle column, drag Start date to Include records where. Set this to be equal to the date range you're looking to analyze. For example, if we want to include any program that happened between two dates, our field would look like this: Sales Order Item/Sales Order Item/Sales Order Item Ticket/Program Events Start date is between X and Y.
  5. Next, add the fields you need in your report to Results Fields to Display. Here are a few suggestions:
    1. To see Program Name and Category, in the left column, beneath Sales Order Item, Sales Order Item Ticket, highlight Program. From the middle column, drag Name and/or Category to Results fields to display. 
    2. To see Event Name and Date/Time, in the left column, beneath Sales Order Item, Sales Order Item Ticket, highlight Program Events. From the middle column, drag Name, Start Date, and/or Start Time to Results fields to display. 
    3. To see the Event Location, in the left column beneath Sales Order Item, Sales Order Item Ticket, expand Program Events and select Location. From the middle column, drag Name  to Results fields to display
    4. If you want to see how many tickets were sold in each program, in the left column Select Sales Order Item. From the middle column, drag Quantity to Results fields to display
  6. Here is an example of a finished query:
User-added image