Created functions to count and limit password requests