histogram and mean/counting from two-tuples on stdin