@feyi1, pls be careful prescribing drugs if you are not a health professional. The doses you recommended are wrong for flagyl and amoxil for a 5 month baby. Moreover how certain are you she has bacteria infection. High percentage of infant diarrhoea are viral.
No self medication pls. If the poo sinks into the diapers, then you can give ORS and zinc. If not, it's fine. It doesn't matter the number of times he/she poos. Baby's on ebf hardly have diarrhoea