I can't tell from your picture whether its male or female. Go to
www.erowid.com search the cannabis section for the pics of male vs. female and that should help. General rule of thumb if you see "balls" hanging down it's a boy. If you see two slender white hairs sticking up, it's a girl.
Genetics determine whether its male or female in most seeds/plants. In some feminised seeds you can buy, some branches may go male, etc. But there are no factors that force the sex on the plants. 50% of all seeds will be male and 50% will be female. If you have been getting mostly male, your next crop may be mostly female. Its nothing more than chance or basic statistics on sex detemination. If you want to harvest 3 female plants always plant 6 seeds to prepare for the male cull.
No you cannot detemine the sex by the number of leaves.