counting method