Implemented couting statistics