A way to get current entities / edicts on the map?

Is there a way to get current entities / edicts on the map in order to see if you are neart the limit or not?

Thanks.

  1. http://facepunch.com/forums/337
  2. ents.GetAll()

Sorry, and thanks lol.