If boys as well as girls inherit the genes of the father as well as mother, does it imply that boys inherit more genes from the father to be boys and the girls inherit more genes from the mother to be girls? Or there is some thing else to it that settles the sex of the children? Since girls may inherit more genes of father and less genes of the mother question arises what decides that they are not born as boys or the other way around why the boys who inherit more genes of their mother are not born as girls?
Most genes are not male or female, so receiving more genes from a father or mother would not make a child more male or female. Whether a mammalian embryo grows to be male or female is pretty much determined by a single gene that's found on the Y chromosome. Called the "Testis-determining factor" (TDF), it triggers the development of male characteristics. TDF is a regulatory gene, and its effect is to switch on other genes, which result in the development of testis. All embryos would become female without the intervention of this gene.
The gene TDF is found on the Y chromosome. Male mammals have one Y chromosome and one X chromosome, females have two X. So there's a 50% chance a fertilised egg will inherent an X, and a 50% chance it will inherit a Y chromosome from it's father, which determines its sex.
Testis determining factor, https://en.wikipedia.org/wiki/Testis-determining_factor
General info about sex determination in different animals (it varies a lot), https://www.nature.com/scitable/topicpage/genetic-mechanisms-of-sex-determination-314
I am assuming that you are asking about human reproduction (which can be generalized for mammalian reproduction).
Humans have $23$ pairs of chromosomes. Of these $1$ pair is known as sex chromosomes. Human sex chromosomes are named $X$ and $Y$. An individual with genotype $44A + XY$ (A denotes the other 44 chromosomes) is a male and an individual with $44A + XX$ is a female.
Ref - https://en.wikipedia.org/wiki/Chromosome#Human_chromosomes
During reproduction the child receives $X$ from the mother and either $X$ or $Y$ from the father. It is the Sry gene on the $Y$ chromosome which gives male rise to male characteristics.
Also there is no such thing as more genes from the mother/father. The gametes (sperm and egg carry equal number of genes from the father and mother.)