What is the coordination number for BeCl2?
Coordination number is determined by compound. It is normal for an element to have several different CN. Preferable CN can change for an element depending on the atom's neighbors. For example, Fe has preferrable CN=6 for fluorine anions, but CN=4 for chloride anions. When heated or under extreme pressure preferable CN may change as well. For example, $SiO_2$ has high-pressure modification with 6-coordinated silicon and 3-coordinated oxygen, while at normal pressure they are 4- and 2-coordinated respectively. 

In case of $Be$ it prefers, just like all elements of the 2nd row, to have CN=4, but in many cases is forced to live with smaller numbers. BTW, in gas phase, $BeCl_2$ exists in equilibrium between monomer with Be's CN=2 and dimer with Be's CN=3.

In your case CN for Be in cristalline $BeCl_2$ is 4, while in gas phase it is 3 and 2 for dimere and monomer respectively. There is no 'one CN for Be atom right for all Be compounds.'