I'm beginner in python programming and got stumpled on a Basic Question: print the number of primes up to a given number.
For example the amount of primes before the number 100.
why my Code is not working? or what is wrong with my logic?
def count_prime(num):
    newnumber = 0
    for x in num:
        if x%2 == 0:
            newnumber = newnumber + 1
    print(newnumber)
count_prime(100)
 
     
     
    