Configuration space of particles in the box The notion of entropy says that we can count microstates that correspond to macrostate. But, I do not understand how this can be done. Does it imply that the state space is discrete (finite or countable)?
 A: Just counting. The problem is that counting not always is easy and probably in many cases you cannot do it explicitly. This is why in most cases you don't start from there. It's a formal definition of entropy, but rather unoperative or unpracticable in most cases. One usually goes through what is called partition function to get all the thermodynamic properties (like entropy).
In the case of particles (gas) in a box, the possible states span a certain area of what is called phase space spanned by all the positions and momenta of the particles. Since these two quantities are continuous, you turn the problem of a sum of the different states into an integral over the possible states.
Hope this helps you more.
A: Microstates may be labelled by a discrete indice  $i$ or a continuous label $y$.
In the  discrete indice case, the total number of microstates could be finite or infinite.
In a Maxwell distribution, for instance, a microstate has a continuous label $y =(v_x, v_y, v_z)$
Statistical Entropy is defined as a sum on microstates of the quantity $-k~p \ln p$, so you have $S =-k \sum p_i \ln p_i$, in the case of microstates labelled by a discrete indice, and you have a continuous sum (an integral) $S=- k \int dy ~P(y) \ln P(y)$, for microstates, labelled by a continuous label $y$ (which may be multi-dimensional as for the Maxwell distribution case).  
A: OP wrote (v1):

Does it imply that the state space is discrete (finite or countable)?

We assume that OP already is well aware that, pragmatically, for macroscopic systems in many cases, it is an extremely good model to treat the energy spectrum as continuous. 
So we assume that OP's actual question is really, if at the fundamental level a system of many quantum particles confined to a box has a discrete or continuous energy spectrum?
This is a good question. At this point in standard textbooks of statistical mechanics, it is usually assumed that it is a good description to view the system as a collection of single particles with perturbative interactions, possibly taking into account the Bose or Fermi statistical nature of identical particles.
In this approximation it hence becomes enough to analyze possible quantum states of a single particle as if it were alone in the box. The single particle spectrum is well-known to be discrete, cf. e.g. this Phys.SE post.
