replaced total with count whenever we are returning a count that is not guaranteed to be the total sum