“cmd.count_atoms” returns a count of atoms in a selection.
cmd.count_atoms(string selection)
def count_atoms(selection="(all)",quiet=1,state=0,domain=''):
count_atoms | api