Get the display number of a display. A display number is usually grabbed from the environmental variable "DISPLAY". For example, this function returns "0" if "DISPLAY=localhost:0.1".