The statistical thermodynamics definition of entropy: $S = kN \ln (W)$ troubles me a lot with the problem of dimenstions. where $S$ is entropy; $k$, the Boltzmann constant; $N$ the number of particles in the system and W the number of microstates corresponding to a given macrostate of the system.
For the equation to be dimensionally correct, $W$ must be a dimensionless number.
But if $W$ were to be a dimensionless number, then rewriting the equation in the form: $S = \ln [(W)^kN]$, we find the quantity in square brackets doesn't make sense - since a pure number is raised to a power that has dimensions! More over, since the argument of a logerthmic quantity must be a dimensionless number, the RHS will have no dimensions while LHS has dimensions leading to a paradox.
Again, statistical thermodynamics is full of equations that give elaborations of the quantity $W$. These elaborations contain logerithmic terms with arguments having dimentions (mostly, properties such as $U$ or $E$ and $V$, OR the corresponding molar quantities such as $U/N$ etc.) which not only defies normal mathematics rules but also gives rise to the perennial problem of Gibbs paradox.
Quantum mechanics, information theory etc are broughin to account for Gibbs paradox - which arises in the first place due to a confusing mathematical expression for entropy.
While there is no confusion in equilibrium (classical) thermodynamics about the fact that S is an extensive property, statistical thermodynamics results/equations lead to arguments wheteher $S$ is an intensive quantity or an extensive quantity - all because of the statistical thermodynamics definition of entropy through the equation $S = kN \ln (W)$ - that is confusing with its inherent problem of dimensions.
Any clarifications regarding the dimensional analysis of the defining equation of entropy in statistical thermodynamics/statistical mechanics is requested.