Depends. If you want to be able to produce seeds that consistently recreate the parents' phenotypes, which is called true-breeding or inbred strain lines (IBL), then it can take 10 generations. This is what the real pro breeders do, or are supposed to be doing at least.
If you just want to get a good pheno on lockdown so you can continue to clone it and maybe over time hone it down then you could accomplish this on your first cross. This is called pollen-chucking. Just crossing two nice plants, or two plants that you have at least. Then just grow out at least 10-20 of the offspring, and after weeding-out the males, you should be left with 4-10 girls that all look different. Out of these you should get at least one killer pheno. You won't know which one it's going to be though until they're completely done flowering, dried, cured, and you smoke it. That's why you have to take a few cuts of each one before flowering them so you make sure that you can keep your favorite pheno going in the future.