Tough choice. The Quadro 4000 is based on NVIDIA's new Fermi architecture and has a few more CUDA cores, but the Quadro FX 5800 was a higher-end card during its time and has more RAM and higher memory bandwidth.
None of this will matter to After Effects, though, because AE processes on the CPU, not the GPU. For AE on a 12-core workstation, make sure you have plenty of RAM.
If there are specific apps you're looking to accelerate with this card, I'd suggest looking for benchmarks.
Principal & Designer at Keen Live
Motion Graphics, Widescreen Events, Presentation Design, and Consulting RenderBreak Blog - What I'm thinking when my workstation's thinking
Creative Cow Forum Host: Live & Stage Events