accurate input counter