dear ankit ,
if u see closely that in both the situation either number of sisters or number of brothers fall short by 1.
if you take 1st condition....................in this faimily thereare only 2girls so each girl will have only one sisterwhich is not satisfying the given conditons
and if you take 2nd condition ,....................in this faimily there is only 4 boys so each boy will have only 3 brothers which again will not satisfy the given condition
so 8 is the correct answer
i hope you will appreciate it