Yufei, although you can control limiting rendering features by setting the MaxRecordCount number at the map service level, it is normally not a good idea to use that measure as the only control. MaxRecordCount is used mainly for performance consideration. But you don't want to confuse the users that the features rendered are the only ones available at that map scale. I would suggest to control the layer visibility by setting their scale dependency. With that, you can control that only features within the limit will be displayed, and meet your performance need as well.
If you can describe more detail how you like to filter the layer, it will help us better help you out.