MongoDB Data loss following machine PowerOff with writeConcernMajorityJournalDefault true
How much time your query was running?? and from where you get next count as you mentioned after stopping primary you get this count is lesser?? also If you can share your script.

It will be obvious that If you are stopping the Script the data will not going to be insert as you expected.