I have the following problem:
There is a large set of records. Each record in the set has an attribute. For some values of the attribute, there is only one record, for other values there are many records with the value. I want to construct the distribution of counts of the attribute with certain count of records. For example that there is a billion values of the attribute which have exatly one record, half a billion with two records, ..., and finaly one value of the attribute with five million records. Imagine a list of all dogs in the world with the name of the owner as the attribute. I need to know how many people have one dog, how many have two dogs and so on. For small sets this distribution is easy to compute but for a large set a lot of memory is needed. I am interrested in approximate methods which use some kind of sampling to obtain results with bounded precission. I am sure, this must be a well studied problem, but I do not know what to look for.
Could you please give me some pointers, where to look and how is this thing called in literature?