I know that molecules in ideal gas can move freely, and molecules in crystal are bonded to some specific location. But can I describe this in a more quantitative way? Do gas molecules have more degrees of freedom?
Yes, by examining the statistical distribution of distances between molecules and angles separating two nearby about a third molecule. In general, correlations of 2nd and higher order of the positions of molecules relative to each other.
For a gas, there are few molecules close together, but some due to molecules colliding and almost colliding. At far distances, it'll be more or less uniform. There'd be nothing of interest in angular correlations.
For a liquid, there'd be none closer than about the size of a molecule, but at that distance many. There'd be mushy peaks in the distribution of distances, and just uniform mush beyond a few molecule-sizes away. There'd be strong angular correlations as nearby molecules try to pack tightly, with fleeting gatherings of several molecules in an approximate crystal, but always jiggling making the angular distribution mushy.
For a crystalline solid, every molecule near or far is at a precise distance, and at precise angles with respect to any reference directions. The distance and angular distributions would look like bunches of Dirac functions, slightly smoothed out due to thermal motion, phonons, impurites and so on.