Number of congruence classes

How many classes of solutions are there to http://stuff.daniel15.com/cgi-bin/ma...Cpmod%7B168%7D

So I did this:

1. Let a be the number of the classes of solutions to http://stuff.daniel15.com/cgi-bin/ma...mod%7B2%5E3%7D

2. Let b be the number of the classes of solutions to http://stuff.daniel15.com/cgi-bin/ma...%5Cpmod%7B3%7D

3. Let c be the number of the classes of solutions to http://stuff.daniel15.com/cgi-bin/ma...%5Cpmod%7B7%7D

So the classes of solutions to http://stuff.daniel15.com/cgi-bin/ma...Cpmod%7B168%7D is equal to http://stuff.daniel15.com/cgi-bin/mathtex.cgi?abc

For case 1. We have http://stuff.daniel15.com/cgi-bin/ma...%5Cpm%203,%204 as congruence classes and only http://stuff.daniel15.com/cgi-bin/mathtex.cgi?%5Cpm%201 and http://stuff.daniel15.com/cgi-bin/mathtex.cgi?%5Cpm%203 works so that's 4 classes of solutions.

For case 2. We have http://stuff.daniel15.com/cgi-bin/ma...0,%20%5Cpm%201 as congruence classes and only http://stuff.daniel15.com/cgi-bin/mathtex.cgi?%5Cpm%201 works so that's 2 classes of solutions.

For case 3. We have http://stuff.daniel15.com/cgi-bin/ma...2,%20%5Cpm%203 as congruence classes and only http://stuff.daniel15.com/cgi-bin/mathtex.cgi?%5Cpm%201 works so that's 2 classes of solutions.

So all together we have http://stuff.daniel15.com/cgi-bin/ma...2%5E4%20=%2016 classes of solutions.

However what I'm wondering is, isn't this way a bit primitive because if I worked out the PPF of some number other than 168 and ended up with say http://stuff.daniel15.com/cgi-bin/ma...?2%5E%7B100%7D as one of the prime powers, then I would have to work out the number of classes of solutions to http://stuff.daniel15.com/cgi-bin/ma...5E%7B100%7D%7D Which means I have to list out http://stuff.daniel15.com/cgi-bin/ma...202%20%5Ccdots then test each of them to see if they work, wouldn't that take ages? Is there a faster way other than plugging a solution from each class of solutions into the equation and seeing if it works?

Thanks.