Hornung’s Guess
  Divination
  Level: Sor/Wiz 0
  Components: V,S
  Casting Time: 1 action
  Range: Long (400 ft. + 40 ft./level) or Touch (see spell description)
  Target or Area: A group of objects
  Duration: Instantaneous
  Saving Throw: None
  Spell Resistance: No
 
You receive a flash of insight on the number of objects or persons in a group. All members of the group must be within range of the spell and the group as a whole must be visible. If you can touch the members of the group, the estimate is exact. If the spell is used at range, the estimate you receive is accurate to the largest factor of ten. For example, if the spell were cast at range upon a group of 439 horsemen, the estimate would be 400. If there were 2,670 horsemen, the estimate would be 3,000. If there were 37 horsemen, the estimate would be 40.

Source: Tome of Magic