def get_bigger_and_equals_counts(y_score, object_index, filtered_objects):
    """
    Gets the number of objects that have a score bigger than and equal to the
    score of the `object_index`.

    Filtering the objects whose index are in `filtered_objects`.

    :param y_score: an array with the score of each object
    :type y_score: np.ndarray, np.array
    :param object_index: the index of the current object
    :type object_index: int
    :param filtered_objects: a (possible empty) set with the indices of the
    objects to be ignored in the rank count
    :type filtered_objects: set[int]
    :return: the number of objects whose the scores are bigger than the current
    object and the number of objects whose the scores are equal to the current
    object
    :rtype: (int, int)
    """
    object_score = y_score[object_index]
    bigger_count = 0
    equals_count = 0

    for j in range(len(y_score)):
        if j == object_index or j in filtered_objects:
            continue
        if y_score[j] > object_score:
            bigger_count += 1
        if y_score[j] == object_score:
            equals_count += 1
    return bigger_count, equals_count