LayerAPI.getNumFeatures

 

long getNumFeatures()

This method returns the number of features held in the layer. (For layers with an associated database table, this number also corresponds to the number of rows in the table.)