This doesn't make sense to me.  What would the ID have to do with counts and why is the arithmetic to determine it different in each case?