Prime numbers with range up to 10^12 : I'm testing some algorithm in console apllication.  
I need to print number of prime time numbers in range from 1 to 10^15.  
This code works but It need to take less than a 4 seconds before timeout.
It works in about when last number is somewhere about 2000000, after that it takes more time.

    static void Main(string[] args)
        {
            string[] s = Console.ReadLine().Split(' ');
            DateTime start = DateTime.Now;
            var first = Convert.ToInt64(s[0]);
            var last = Convert.ToInt64(s[1]);
            int counter = 0;
            for (long i = first; i <= last; i++)
            {
                if (i > 2 && i%2==0)
                {
                    continue;
                }
                if (isPrime(i))
                {
                    counter++;
                }
            }
            Console.WriteLine(counter);
            TimeSpan duration = DateTime.Now - start;
            Console.WriteLine(duration.TotalMilliseconds);
            Console.ReadLine();
        }
        public static bool isPrime(long number)
        {
            if (number == 1) return false;
            if (number == 2) return true;

            for (int i = 2; i <= Math.Ceiling(Math.Sqrt(number)); ++i)
            {
                if (number % i == 0) return false;
            }
            return true;
        }
As you can see in for loop, first I examine whether number is i > 2 && i%2==0 since in that case number isn't prime. 
Is there any more tricks to avoid such numbers not to get to the isPrime method or what's the best solution to avoid timeouts?