def get_object_instances(predictions, target, confidence):
    """
    Return the number of instances of a target class.
    """
    targets_identified = [
        pred for pred in predictions if pred['label'] == target and float(pred['confidence']) >= confidence]
    return len(targets_identified)