Bob has two children does the job, all by itself.
By Grice's Quantity Maxim, if the speaker had known the genders, they would have indicated them in the sentence; but since the speaker didn't indicate the genders, their ignorance is conversationally implicated.
The two sentences quoted
Bob has two children. I don't know both of their genders.
don't go together well, for a variety of reasons.
- The second sentence is ambiguous, like any negative governing a quantifier.
- Making the second sentence into a relative clause modifying children involves Pied-Piping.
- Relativization also involves inverting the quantifier and its focus NP with the negative.
Any such complex sentence would be very hard to understand, and thus not recommended.