Practical determination of the coordination number in granular media