Model selection results for latent high-dimensional graphical models on binary and count data with applications to fMRI and Genomics