No, you can use strlen to find out how many characters they actually entered. Remember though, to read the link in my previous post (the red text), about the fgets and removing the newline. Make sure you do that first thing after you call fgets, before you check the length.
Do something like:
EDIT: Note, you should check the return value of fgets to make sure it worked too, I left that off since this was a simple example. Always check whether a function succeeded, and act appropriately, before you let your program continue.
fgets(pass, sizeof(pass), stdin);
// remove newline
int pass_len = strlen(pass);
check strtol -- if errors, the user entered non-digits (letters, spaces, punctuation, etc)
check prime of last 3 digits