Efficient Method To Count and Generate Compact Protein Lattice Conformations