added counting
added counting