I'm a bit confused by the entity count in the F3 screen. I think I understand the visible entities: point cursor at mobs, even if they're hidden behind walls, and the number goes up. Point at the sky or some other empty space, it goes down. It's the number of entities not culled by the view frustum. The total entity count confuses me, though. Try this:
1. Create a superflat world with no structures in Creative mode (seems the simplest way to test)
2. Fly up to Y = 255 or thereabouts.
3. Hit F3
For me, it shows a bunch of entities. In a brand new superflat world with Generate Structures turned off I can see 17. In another world where I've built some stuff there are 140-240 entities. Nothing I built in that world is on the wiki page that lists entities. I don't expect them to be mobs, since there's nothing but air for more than 128 blocks in every direction. So, what are these things? Particle effects from torches/redstone? Clouds?
To get to the related question that caused me to try this in the first place: is there any way to count the number of mobs currently in existence? Such a thing would be incredibly useful in finding an optimal place to build a mob trap.