A quadratic polynomial f(x) is called sparse if its degree is exactly 2, if it has integer coefficients, and if there exists a nonzero polynomial g(x) with integer coefficients such that f(x) g(x) has degree at most 3 and f(x) g(x) has at most two nonzero coefficients. Find the number of sparse quadratics whose coefficients lie between 0 and 10, inclusive.