TPA: A New Method for Approximate Counting