import json

count = 0
with open('qualifica_brasil_final.json', 'r') as f:
    decoder = json.JSONDecoder()
    buffer = ""
    for line in f:
        buffer += line
        try:
            while buffer:
                obj, idx = decoder.raw_decode(buffer)
                count += 1
                buffer = buffer[idx:].lstrip()
        except json.JSONDecodeError:
            continue

print(f"Total de JSONs: {count}")
