Starfleet's official mission is exploration: "To seek out new life and new civilizations -- to boldly go where no one has gone before." Consequently, Starfleet vessels carry large quantities of scientific equipment, and large portions of their crews are researchers.
Despite its stated mission, however, Starfleet is also solely responsible for the defense of the Federation. In addition to science equipment, Starfleet vessels are heavily armed and shielded, making them formidable opponents for the other Alpha Quadrant powers.
Despite access to some of the most powerful combat ships in the Alpha Quadrant, the Federation remains poorly prepared for a military emergency. While powerful individually, their fleet assets are so few and so scattered that they frequently have few or no ships in position to respond to a military emergency. Worsening the situation, Starfleet command generally sees defense as a secondary function at best, so they require no military exercises to maintain the combat skills of their crews.
Worse still, as the Federation's only defense organization, Starfleet is responsible for ground combat operations as well, and the preparedness of their ground troops is even more obviously inadequate.
Some Trektards insist that the NCC hull number on Starships are indicative of the number of vessels in active service, which would mean Starfleet numbers roughly 50,000 ships. However, in real life navies, new hull numbers are created as new ships are built, instead of being reapplied to newbuild vessels. Therefore, smaller numbers are more reasonable.
Starfleet fielded several thousand vessels during the Dominion War, but has severe difficulty mustering more then a dozen ships without advance notice.