Problem with finding the number of distinct planes that pass through the origin with the following constraints The following question came in my school's mathematics exam today, but I think it's more complicated than it looks:
Find the number of distinct planes that pass through the origin with the following constraint on any particular component of their normal vector: $m\in Z,-5≤m≤6,$ where the different components are not necessarily distinct. Note that $m$ is just a component, in the $\hat{i},\  \hat{j},$ or $\hat{k}$ direction of the normal to the plane.
For more clarity, here's an example:
Consider the plane $ax+by+cz=0,$ with normal to the plane = $\begin{pmatrix} a\\ b\\ c\\ \end{pmatrix}.$ Here the different values that $m$ takes up are $a,b,$ and $c$. So I want to find the total number of distinct planes whose normals satisfy the above equation for different values of $m$ as per the aforementioned constraints, i.e. $m\in Z,-5≤m≤6.$
Now, a straightforward, and rather intuitive way of doing this would be to take the different possible values of $m$ in $a,b,$ and $c$ as $\{-5,-4,-3,-2,-1,0,1,2,3,4,5,6\}=12$ possibilities for each component.
So, by the multiplication rule, the total number of normal vectors would be $12^3=1728.$ But each plane has $2$ normal vectors, so the number of planes $=\frac{1728}{2}=864.$
In the exam, this question was only for $3$ marks, so I feel that this is what they expected us to do. However, I feel that there's more to just this in the problem, and $864$ is an overestimate. Here's why:
Consider $a=b=c=5,$ giving us $5x+5y+5z=0.$ But compare this to $a=b=c=1$ or $a=b=c=2,$ etc.
Essentially, these are the same planes. Even a plane such as $2x+4y+6z=0 \equiv x+2y+3z=0.$
After some thought, I realized that the only distinct planes that would "count" would be those that had a GCD of $1$ or $0$ (as $m$ can be $0$) among all $3$ components, $a,b,$ and $c.$ So does this boil down to a more complicated problem in number theory? If so, then how does one proceed with this problem in number theory?
Edit: As @Alan mentioned, it's useful to divide it into $3$ cases, where part of the problem boils down to finding unique fractions by picking 2 elements from the set: $$\{-5,-4,-3,-2,-1,0,1,2,3,4,5,6\}.$$
This is because a unique fraction will always have a GCD of $1$ (or $0$) between its numerator and denominator. But I am genuinely clueless as to how I can proceed from here? If anyone has one, then a complete, comprehensive solution would be much appreciated!
 A: Not a full answer, but it should get you started:  The key here is any scalar multiples of each other gets you the same plane.  So, for instance,  (1,0,0) gets you all of the ones where the second and third components are 0.   (1,1,0) gets you all of the planes where the first and second are the same and the second is 0. So there are only 3 planes with 2 components 0.
The ones with 1 component 0 any distinct ratio (a,b,0) between a and b generates the same plane.  (IE (1,2,0), (2,4,0),  (-1,-2,0), etc.).   So look how many distinct fractions you can form of two numbers, then multiply that by 3 for what component you can put the 0 in
The ones with no 0s you have to consider is there a scalar that takes you from one triple to another, if so, its the same. Once you hit a certain ratio you know you can't get to anything else and stay in your range.  for instance, (1,4,c),the only thing that will match with is (-1,-4,-c) for any c, since multiplying by a number bigger than 1 will take the 4 out of range.
A: There are $2^3-1=7$ with common factor 6 which can be ignored.  26 with common factor 5, 26 with common factor 4, $64-8=56$ with common factor 3, 216-27-8+1 with common factor 2, and the origin.
At first glance, that plays merry heck with the set of normals that have a negative partner.  Perhaps leave those with a 6 until the end.
