linear pattern and equations

Is it possible to control the number of instances of a linear pattern using an equation?SolidworksParts And Features