Implement stats collection