Scaler mode technique for the ARGO-YBJ detector