def count_sequences(data):
    """Counts the number of sequences in the data.

    :param data: data
    :type data: np.array
    :return: number of sequences
    :rtype: int
    """
    c = 0
    s, e = 0, 0
    while 0 <= s < len(data):
        e = data[s]['eos']
        s = e
        c += 1
    return c
