correct count variables