Discrete (lattice) distributions related to (stratified) rank tests