the max count in scan should be a number, not a string :(