Text input counter