creating counter