The number of covalent bonds is determined by the number of valence electrons of an element. The number of electrons tells the maximum number of bonds an element allows. In this case, an oxygen atom requires two bonds. So for Sio2, each oxygen atoms are bonded in double bonds to Si. Hence there are two covalent bonds.