If the code goes there, you are not in localization mode. In mapping mode, it would increase even if the robot is not moving if RGBD/LinearUpdate or RGBD/AngularUpdate are zeros.
Related topic
https://github.com/introlab/rtabmap/issues/494#issuecomment-777145931