I have no idea why she thinks she can keep your money. She breached her duty as a landlord to provide you with a place to stay by getting evicted, and she owes you a refund of the rent she didn't earn.
I have no way of knowing what basis she might claim for her countersuit. It sounds to me like she spent your money and is blustering to avoid having to pay you back.

