Gravar-mail: Photon counting performance of amorphous selenium and its dependence on detector structure