nodes: 0, module; 1, function_definition; 2, function_name:count; 3, parameters; 4, block; 5, identifier:event_collection; 6, default_parameter; 7, default_parameter; 8, default_parameter; 9, default_parameter; 10, default_parameter; 11, default_parameter; 12, default_parameter; 13, default_parameter; 14, expression_statement; 15, expression_statement; 16, return_statement; 17, identifier:timeframe; 18, None; 19, identifier:timezone; 20, None; 21, identifier:interval; 22, None; 23, identifier:filters; 24, None; 25, identifier:group_by; 26, None; 27, identifier:order_by; 28, None; 29, identifier:max_age; 30, None; 31, identifier:limit; 32, None; 33, comment:""" Performs a count query
  
      Counts the number of events that meet the given criteria.
  
      :param event_collection: string, the name of the collection to query
      :param timeframe: string or dict, the timeframe in which the events
      happened example: "previous_7_days"
      :param timezone: int, the timezone you'd like to use for the timeframe
      and interval in seconds
      :param interval: string, the time interval used for measuring data over
      time example: "daily"
      :param filters: array of dict, contains the filters you'd like to apply to the data
      example: [{"property_name":"device", "operator":"eq", "property_value":"iPhone"}]
      :param group_by: string or array of strings, the name(s) of the properties you would
      like to group you results by.  example: "customer.id" or ["browser","operating_system"]
      :param order_by: dictionary or list of dictionary objects containing the property_name(s)
      to order by and the desired direction(s) of sorting.
      Example: {"property_name":"result", "direction":keen.direction.DESCENDING}
      May not be used without a group_by specified.
      :param limit: positive integer limiting the displayed results of a query using order_by
      :param max_age: an integer, greater than 30 seconds, the maximum 'staleness' you're
      willing to trade for increased query performance, in seconds
  
      """; 34, call; 35, call; 36, identifier:_initialize_client_from_environment; 37, argument_list; 38, attribute; 39, argument_list; 40, identifier:_client; 41, identifier:count; 42, keyword_argument; 43, keyword_argument; 44, keyword_argument; 45, keyword_argument; 46, keyword_argument; 47, keyword_argument; 48, keyword_argument; 49, keyword_argument; 50, keyword_argument; 51, identifier:event_collection; 52, identifier:event_collection; 53, identifier:timeframe; 54, identifier:timeframe; 55, identifier:timezone; 56, identifier:timezone; 57, identifier:interval; 58, identifier:interval; 59, identifier:filters; 60, identifier:filters; 61, identifier:group_by; 62, identifier:group_by; 63, identifier:order_by; 64, identifier:order_by; 65, identifier:max_age; 66, identifier:max_age; 67, identifier:limit; 68, identifier:limit
code: def count(event_collection, timeframe=None, timezone=None, interval=None, filters=None, group_by=None, order_by=None,
            max_age=None, limit=None):
      """ Performs a count query
  
      Counts the number of events that meet the given criteria.
  
      :param event_collection: string, the name of the collection to query
      :param timeframe: string or dict, the timeframe in which the events
      happened example: "previous_7_days"
      :param timezone: int, the timezone you'd like to use for the timeframe
      and interval in seconds
      :param interval: string, the time interval used for measuring data over
      time example: "daily"
      :param filters: array of dict, contains the filters you'd like to apply to the data
      example: [{"property_name":"device", "operator":"eq", "property_value":"iPhone"}]
      :param group_by: string or array of strings, the name(s) of the properties you would
      like to group you results by.  example: "customer.id" or ["browser","operating_system"]
      :param order_by: dictionary or list of dictionary objects containing the property_name(s)
      to order by and the desired direction(s) of sorting.
      Example: {"property_name":"result", "direction":keen.direction.DESCENDING}
      May not be used without a group_by specified.
      :param limit: positive integer limiting the displayed results of a query using order_by
      :param max_age: an integer, greater than 30 seconds, the maximum 'staleness' you're
      willing to trade for increased query performance, in seconds
  
      """
      _initialize_client_from_environment()
      return _client.count(event_collection=event_collection, timeframe=timeframe, timezone=timezone,
                           interval=interval, filters=filters, group_by=group_by, order_by=order_by,
                           max_age=max_age, limit=limit)