I don't think there's a cap on the amount of resources you can send allies. I do not have a definitive source for this but I have done some testing:
My team once tried a strategy where one of us only built expansions and economy, protected by static defenses. She then piped the resources to my friend and I, who went for high-tech builds. She never ran into a limit on sending resources. This "strategy" is kind of fun since it lets one person handle all the macro and another all the micro, but it has it's own risks.
You cannot send resources immediately though. When you start a game, if you click the transfer button right away, you will see there is a delay before you can start sending (I think it is 5 minutes but I could be wrong). I assume this is to prevent a true cheese rush where people send all their resources to one person, effectively letting one person start with 18 workers.
The most important thing to realize is that 3 workers per mineral is the max you would want. It is not necessarily optimal however. The third worker is not as effective as the first 2. Once you have more than 2 workers, one of them will always be "hanging around" waiting for its turn to be useful. Therefore, if you have an expo with less than 2 workers per patch, you would do better to move some workers there. You will get more minerals per minute by having 2 workers per patch at your main and 1 per patch at your expo than you would with 3 workers per patch at your main.
With that in mind, here are some answers:
How to keep track of how many you have at a specific base?
Make sure all your mineral patches and gas geysers are visible on the screen. Now double click on one of your workers. This will select all your workers. At the bottom middle of your screen you'll see wireframes of all of them, 8 per row. if you have 3 rows full, that's 24 workers, which is a decently saturated base. "Full" saturation would be about 24 on minerals and 6 on gas, or 30. But if you have an expo, you're better off moving some of them... (Note that MULEs do not conflict with SCV's for mining time, so they should not factor into your counts.)
When you expand, should you build workers from that base or transfer?
This depends on the situation. If your expo is far away from your main, and there are potentially enemy forces in between, then transferring is probably a bad idea. If you have more than 2 workers per patch in your main, and your natural is nearby and well defended, then transferring makes sense. In my experience, Zerg players usually expand before they have much more than 2 workers per patch, while a 1 base terran or protoss will often build up 30 workers on one base before expanding.
**Rebuilding after some being killed **
I'm not sure what the question is here - you can just rebuild them like you normally build them.
Transferring when minerals run out
There is no automatic way to have workers move to an expansion when minerals or gas run out. However, you can listen for the voice that says "mineral patch depleted" and start transferring them. You can also look for the idle worker icon that pops up on the lower left hand side of your screen, that will alert you to a worker who is not doing anything.
Race Specific Tidbits
Protoss can chronoboost workers to help get an economy up and running, or recover from an attack.
Terrans can get by with less SCVs if they have a lot of orbital commands to summon MULEs with.
Terrans can load SCV's into command centers, then fly them to a new base.
Zerg players need to remember to build more drones to replace drones used to build buildings.
Best Answer
In this particular scenario, you should be manually dropping one on each closer/higher yield patch.
Worker/MULE AI will have the gatherer go back to the patch they were previously working on so this will help you determine which one they are mining from.
For Example you have mineral patches 1,2,3,4,5,6,7,8 with patches 2,4,6, and 8 being the patches with more resources and closer. Hotkey, click on 2, Hotkey, click on 4, etc. If you click spam on one of the mineral patches the MULE will simply go to the next closest one that is not occupied by a mule. If you were to just mass click on 2, the next MULE would either go to 1 or 3. The MULE after that would go to 1 or 3 (which ever one the 2nd MULE is not at), the MULE after that, the 4th MULE would go to 4.
It could also be going to 4 first and then 1 and 3 after. It's been a while since I've played Terran to see the exact patterns of movement for the MULEs.