add counting method