How to disabled Statistics module for role or anonym users?
The statistics module doesn't provide that option, or an easy way to inject that logic at first glance.

If you're using the AJAX counting method, you can implement hook_js_alter() to change the settings that the module adds, specifically altering the path it sends the tracking AJAX request to. You can change that to a file controlled by your own module, and you can make the decision whether or not to save the record based on the current user in there (after copying the code from the stats module's own statistics.php file).

If you're not using the AJAX method, there are a few different ways you could attack it, but each are more of a pain than it's probably worth. If the AJAX version isn't an option, I'd recommend writing your own custom module that incorporates the existing logic from Statistics that you need, plus your new logic.

The other options are doing things like trying to remove the Stats module's implementations of hook_exit() and/or hook_node_view() from your own module, and re-implementing them. This is never a great approach as you have to re-visit your module every time there's a core update to make sure nothing's changed.

Or, you could maintain a patch to the core module. Usual caveats apply if you go down that route obviously.