Implemented and tested ph::count