refactor get count time