Prime counting function

Hi all,

I was just wondering if there is any functions or code snippets that I can reference to set up a prime counting function in IGOR?

The prime counting function is basically, the function counting the number of prime numbers less than or equal to some real number x.

The most precise formula for the prime counting function along with the logarithmic integral function, is given in the pics below, but I was just wondering, that while am searching for codes that calculate the prime counting function, I could also post this topic here, in case any one has references to code snippets or so!

Thanks very much!