this problem could have a few causes.
the battery clamps are corroded and need cleaning
a loose wire from the battery
faulty starter relay
a weak starter
I would start by inspecting and cleaning the battery posts and clamps also make sure that the clamps are fully seated on the posts and tighened securely.
check the battery and starter wires for signs of wear, such as torn or burned insulation or frayed wire, near connectors.
If cleaning the connections in the charging / starting system does no good then you might need to replace the wires completely.
you could also remove the starter (disconnect the battery first!) and take it to a local parts store such as Autozone for testing.
as for the excessive engine revs, this could be something as simple as needing to add some of the proper type of automatic transmission fluid. after you get the vehicle starting again you should check the transmission fluid level
original posted @
http://www.allfordmustangs.com/forums/2005-2010-v6-mustang-tech/120748-2005-2008-mustang-auto-transmission-fluid-adding.html
"Basically, the drain plug on the transmission has another plug in the center of it. You add fluid and use it to determine if the fluid is filled as it is connected to a tube in the drain pan. They tell you to pump Mercon V transmission fluid into this connection. You will need to get a hose adapter to scew into the center tap and connect a hand pump or electric pump to the hose fitting. When you think you have added enough, disconnect the hose, if you are underfilled, nothing will come out, if you are overfilled then fluid will come out until it drains down to the proper level. Make sure the car is parked on level ground when you do this or you will not get proper results. When removing the center plug, make sure you hold back on the drain plug with an open end or box wrench, or you may end up removing the drain plug and will drain the entire transmission fluid that is in the pan, rather than just checking to see if it is full."
I like to start with the free or cheap stuff and work my way up to more expensive solutions.
so in summary
1.) check clean and reinstall battery cable clamps
2.) check wires and connections on starter as well as any power distribution blocks or
engine / chassis ground.
3.) take starter to parts store for testing, take the battery as well, most can test or charge your
battery in as little as an hour.
Finally, if none of these solutions remedy the situation then you may need a new alternator or serpentine belt.
hope this helps