New counting functions