If a or b is 0, both must be 0.
Consider the case a,b=0. Let g>0 be the G.C.D. of a and b, and a=ga′, b=gb′. Substituting them into the given equation we get
ga′2(b′2−4ga′3)=b′3.
Since a′ divides b′3 and a′ and b′ are relatively prime, a′=±1. Therefore a divides b. Let b=ac (c∈Z). Substituting them into the last equation we get
ac2=4a2+c3.
Let d>0 be the G.C.D of a and c, and a=dA, c=dC. Substituting them into the last equation we get
dC2(A−C)=4A2.
Since A and C are relatively prime, C2 must divide 4. Therefore C=−2,−1,1,2.
Since d=C2(A−C)4A2=C24(A+C)+A−C4 is an integer, A−C must divide 4. By d>0, A−C must be positive. Checking all the possible cases one by one, we get (A,C)=(−1,−2),(3,−1),(1,−1),(5,1),(3,1),(2,1),(3,2).
From b=ac, we get all the possible cases, including (a,b)=(0,0), as (a,b)=(0,0),(−1,2),(2,−4),(27,−243),(27,486),(32,512),(54,972),(125,3125). So the answer is 8.