Prime counting function implementations