Corrected the bug on the incrementation on search counter