hello, I read your question thoroughly.
loose motions means that your intestines take less time to expel the feaces, which means it has got more than normal motility. coffee definitely increases intestinal motility.
you need to do a few investigations to find out what's the cause of this increased motility. mostly an infectious agent could be the cause while some-times
indigestion could be a cause(
celiac disease & tropical spruce etc) and still it could be due to
irritable bowel syndrome.
you need to go to General practitioner and could ask for investigations like complete stool examination, serology for a few infectious agents, an
Ultrasound abdomen, serology for celiac disease.
If these tests turn out to be normal then most probably you are having irritable bowel, but there is nothing to worry about. a few life style modifications could help you a great deal. decreasing coffee can help a great deal. Adopt a healthy diet habit.
And to answer your question; loose motions and gas have a complicated relationship sometimes loose motions can lead to gaseous abdomen while some times
bloating can occur without any loose stools. so there is no direct relationship between loose stool and
gas problem and vice Versa.
I hope you found this helpful.
If any further questions you can write to me any time.
best regards.
Dr. Abdur Rehman Alozai