How to cook perfect long grain rice?
As I don't know what kind of rice you are using, but there are some tips which can help you to make the rice less mushy and non-sticky grains: 


You can add one tablespoon of lemon juice so it will help the rice not to stick.
Do not cover the pan with a lid while you are boiling the rice.
Do not stir with spoon too much as it can break the grains of rice into pieces, which can cause mushy rice.
Cooking rice with too high flame can also cause the rice to clumps.
Also you should rinse the rice before cooking them.
I also followed these tips and it works for me.