How to calculate the coordination number on a surface?

Hello dear users lammps!

I am new to using the Lammps, my system is a surface study of Ni in which I am depositing Al And I calculate the coordination number of Ni-Ni, Ni-Al, Al-Al, Ni and Al

As I can calculate?

I appreciate your attention and all the information you can provide

regards