Number of threads

Is there any formula to compute the total number of threads that can be used for a kernel in a graphics card.
I am planning to use Geforce GTX 580… Please say how many threads can be used at an instance