Update number of different pixels