Several books that I have read say that in $\ce{H2O2}$ the degree or extent of H-bonding is 6 as each H atom would form 1 and O atom would form 2 H-bonds respectively. However if we look at HF the no.of H-bonds formed by it is only 2 (because in overall mixture of molecules the extra lone pairs present in F would out no. the no. of available H atoms with partial positive charge)
My question is that going with the same logic even $\ce{H2O2}$ should form only 4 hydrogen bonds as the no. of lone pairs in O would outnumber the H atoms available then why is the degree of H bonding in $\ce{H2O2}$ 6 but not 4?