import itertools


def natoms(self):
    """
    Sequence of number of sites of each type associated with the Poscar.
    Similar to 7th line in vasp 5+ POSCAR or the 6th line in vasp 4 POSCAR.
    """
    return [len(tuple(a[1])) for a in itertools.groupby(self.syms)]