Paircounting script