Add counting read ID function.