The Mr Malty yeast calculator (need flash installed) has an option to calculate how much yeast cake you should re pitch. Its a ballpark estimate since one yeast cake isn't the same as the next, buts it at least attempts to quantify how much you should use.
You can also scoop up some of the cake, put it in a glass jar with some water and shake it up, and watch it settle over a few hours or days. In the first hour, most of the trub will settle down. Then, like a light dusting of snow, the yeast layer will settle on that. Maybe there will be some other layers of stratified combinations of yeast and trub, but for the most part the stuff that settles first is mostly coagulated proteins / break material and hops aka trub. That stuff isn't going to help your next batch, and might even affect the flavor. This glass jar experiment is called yeast washing if you do it with sterile water and a clean environment, can get pretty pure yeast.
Of course there is possibly a greater risk of contamination if you go through steps to transfer yeast cake, wash it, reuse it. It also is another thing to keep clean and worry about. In the past I have dumped fresh wort right into the same fermenter on top of a cake (lazy way - also this is almost guaranteed to be overpitching, and get a less than healthy fermentation because the yeast doesn't replicate enough and its stressed out yet because theres so much of it it works so fast it blows up and is done too quickly and has done a sloppy job without cleaning up). I've also dumped 1/3rd of a yeast cake into a clean fermenter, the idea being that I get most of the top layer of yeast cake, and not the trub at the bottom layer. The best method for reusing yeast cake that I have found it to add some wort or beer, and slightly roll it around to get just the top layer of yeast off the cake and less compacted. Sort of a "wash in place" if that makes sense. Then dump that into my new aerated wort. I think its a good balance between effort and acceptable results.
When almost all professional breweries repitch, they either get the top krausen during peak fermentation, which is all nice active top of their game yeast, or else after fermentation they can drop the trub out the bottom of their conical fermenter, toss it, and finally after the trub layer is drained out the bottom it starts running clean yeast, they keep that part and use it immediately, or within a week or two.
I used to brew every weekend, and would have yeast cakes to repitch onto most of the time. Usually up to 3 generations before I'd want to switch strains. I probably saved a hundred bucks on not buying new yeast every batch, but I was never completely satisfied with my re-pitched brews and think this may have been part of the reason. If you're as cheap as me, its very tempting to repitch, but I think the best chances of making an award winning beer would be to buy the right amount of fresh liquid yeast and pitch properly.