fixed counting

I updated the script to remove some double counting that was occuring