Restricting primitive scorer to primary track

I am a geant4 and c++ novice. I would like to count the number of steps that a primary particle takes in a detector. It appears that setting up a primitive scorer to count the number of steps is possible, but it appeared that it would count both primary and secondary particle steps. Is it possible to restrict the number of steps scorer to only primary particles?