Fast prime counting functions