Some Mathematica code for counting number of solutions by brute force (and links to some previous solutions).