Compute count.