The diarrhea and stomach aches are almost certainly due to abrupt discontinuation of the Vicodin. Regardless of whether you are taking this medication for pain or any other reasonable condition, this medication and other opioids like it (Percodan, Percoset, Oxycontin, Methadone) all produce physical changes. As a patient continues taking an opioid (any opioid) these physical symptoms become tolerated. This does not mean that "a person gets used to them." Instead, it has a physiological meaning - the body adjusts to that dose of the opioid and begins to normalize function at that dose. Constipation and other symptoms gradually fade away in a physiological process of adaptation.
You have to be very careful in taking and stopping opioids or other medications where the body becomes tolerant (benzodiazepines like Valium or Serax or Halcyon and barbiturates (any medication ending in "ol" or "al.") It can be dangerous for you to increase your dose of Vicodin or Soma or any other tolerance-producing medication in a precipitous fashion. You may develop craving and a psychological need for these medications at doses that are not good for you, but even more important are the direct physical effects produced on your body. These include inability to stay awake, depressed breathing, constipation and trouble concentrating.) "Breakthrough pain" happens and it is sometimes necessary to increase a usual dose of an opioid to deal with unexpected, short bursts of pain. However, significant increases over what has been prescribed — nine pills is too much- will definitely produce constipation and could very likely produce more dangerous problems.
Please do not simply discontinue the medication; don't go from nine down to one. This will definitely produce stomach cramps and diarrhea but could also result in a seizure; even worse, these effects can happen any time up to about five days following discontinuation. If you find yourself taking more opioid than prescribed, it is far better to gradually decrease your dose. Best of luck.