Brown red discharge/blood

TMI.. only when fart or poop. I know obviously it's because I'm straining the muscles. But why is it not coming out otherwise? Do I count this as a period? This happened two weeks ago too.