yt.frontends.stream.data_structures.StreamParticleFile.count

StreamParticleFile.count(selector)