how to calculate the number of bond between the atoms?

Hi
id like to know, how to calculate the number of bonds between the atoms?
i work in the ceramics material with Ca and Si atoms and need to know the number of the bond between the ca and Si atoms. 
i saw the script about the number of the  h bond in this topic:
(Updated Link​​​​​​​)
and the script code introduce for calculate the h bond: (download​​​​​​​)
 
i use this script and very good code for calculate the number of h bond. for the other bonds (specially between the Ca and Si) do you have any script?
could you please help me about this.
Best Regards