users statistic count bug fix
code refactoring