def check_equations_for_primes(var_a, var_b, primes):
    """Return the number of consecutive primes that result for variable
    a and b for the formula: n**2 + an + b. Starting with zero.
    """
    counter = 0
    for i in range(0, 1_000):
        temp = (i**2) + (i * var_a) + var_b
        if temp not in primes:
            break
        counter += 1
    return counter