Number of terms in a Geometric Progression