doc: how to count the number of elements in possibly infinite sets