def METHOD_NAME(
    self,
    *,
    operations: Set[PrimitiveOperation],
    key_types: Set[KeyType],
    client_parameters: ClientParameters,
) -> Dict[Parameter, int]:
    """
    Count the amount of specified operations in the program and group by parameters.
    Args:
        operations (Set[PrimitiveOperation]):
            set of operations used to filter the statistics
        key_types (Set[KeyType]):
            set of key types used to filter the statistics
        client_parameters (ClientParameters):
            client parameters required for grouping by parameters
    Returns:
        Dict[Parameter, int]:
            number of specified operations per parameter in the program
    """
    result = {}
    for statistic in self.statistics:
        if statistic.operation not in operations:
            continue
        for key_type, key_index in statistic.keys:
            if key_type not in key_types:
                continue
            parameter = Parameter(client_parameters, key_type, key_index)
            if parameter not in result:
                result[parameter] = 0
            result[parameter] += statistic.count
    return result