"I have two sons."
Translation:मेरे दो बेटे हैं।
मेरा is the possessive form of मैं while मुझे is the dative.
If you want to check if मेरा or मुझे is appropriate in a sentence, try changing the subject from मैं to some other noun. If you need to use the postposition का/की/के, then you know that the noun is in the possessive case and you have to use मेरा/मेरी/मेरे when you change the subject back to मैं (Eg: पेटर का कुत्ता - मेरा कुत्ता).
If you need to use the postposition को for nouns, you'd need to use मुझे with मैं.
The way to say that you have something in Hindi is to use -के पास (literally 'with me'). So, 'Peter has a pen' becomes 'पीटर के पास एक कलम है' which is literally 'With Peter is a pen'). Similarly, 'I have a book' is 'मेरे पास एक किताब है'.
But this construction is not appropriate for 'having' relationships with people (because they are not necessarily 'with' you) and so you drop the 'पास'. So, the way to say 'Peter has two brothers' is 'पीटर के दो भाई हैं' (which is literally something close to 'Peter's two brothers exist'). Similarly, for the first person subject, 'I have two sisters' is 'मेरी दो बहिनें हैं'.