A few years ago I received a Bachelor's in Computer Science and I'm planning to return to school as a non-degree student. I'd like to complete prerequisite courses for a PhD program in Mathematics including supplemental graduate level math courses. As a non-degree student I would complete core courses such as abstract algebra, analysis, linear algebra, and topology. Additionally I would take the general GRE with the math subject test, and work towards letters of recommendation. How effective is the completion of prerequisites outside of an undergraduate to satisfy admission requirements for a PhD program?
There isn't any issue about time (or age, in most places). If you attend an accredited university for your coursework and get grades like any other student then you should be fine, provided that they will provide a transcript of what you have done when you apply later to a degree program.
But doing online courses or unaccredited work is much chancier and you would then need some other way to assure the new institution that you have the required background.
But ask the registrar of the place where you will take courses about such things (grades, transcripts) to be sure.
It is also very advantageous if you make a positive impression on the faculty giving those courses, since your original professors may not remember much about you and you will want letters of recommendation.