I need some help. I need to see if a number entered is a prime number. Here is my code:

Code:

/* Check to see if a number is prime or not.
A number is prime if it can only be dividied by itself and 1
but by no other number. */
#include <stdio.h>
int isPrime(int number)
{
int count;
for (count=1; count<number; count++)
{
if (number % count == 0 ) return 1;
}
return 0;
}
int main()
{
int number;
printf("Please enter a number ");
if (scanf("%d", &number) != 1)
{
printf("Invalid number entered\n");
return 1;
}
if (isPrime(number))
printf("\n%d is prime\n", number);
else
printf("\n%d is not prime\n", number);
return 0;
}

I cant seem to get the right results. What am i doing wrong? Please help

thanks