Fix reading the number of keys in a .idx file