The Loewner matrix pencil is an essential component of the realization and model reduction method for dynamical systems (known as the Loewner framework). This method was initially derived to construct reduced-order models (ROMs) of linear dynamical systems from data. More precisely, the transfer function of the ROM interpolates the original input-output data set corresponding to samples of a (rational) transfer function, or even of a complex irrational function (by enforcing rational approximation). Here, we are interested in the latter interpretation. We first describe a computationally and numerically simple procedure to estimate the "non-trivial" (harmonic) zeros of the famous Riemann zeta function (based on the Loewner framework). These approximated zeros are then used to recover the corrected Riemann prime counting function, approximating the prime number cardinality. We illustrate how efficient the Loewner framework is to recover this specific stair shape function.