added count/statistic functions